Dostępny jest już nowy interfejs Search Ads 360 Reporting API. Dołącz do grupy dyskusyjnej Google searchads-api-announcements, aby na bieżąco otrzymywać informacje o nadchodzących ulepszeniach i wersjach.
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Jednym z możliwych sposobów wygenerowania danych logowania OAuth 2 jest użycie poziomu testowego OAuth 2. Platforma OAuth2 Playground w połączeniu z konsolą interfejsu Google Ads API umożliwia ręczne tworzenie tokenów OAuth2.
Platforma do testowania OAuth2 jest przeznaczona dla użytkowników, którzy potrzebują dostępu tylko do jednego konta menedżera lub użytkownika Google Ads. Jeśli chcesz poprosić wielu użytkowników o dane logowania, lepiej skonfiguruj bibliotekę klienta dla OAuth w Search Ads 360.
Pobieranie identyfikatora i tajnego klucza klienta
W sekcji Krok 1. Wybierz i autoryzuj interfejsy API kliknij na liście Search Ads 360 Reporting API i wybierz jego zakres,https://www.googleapis.com/auth/doubleclicksearch. Następnie kliknij Autoryzuj interfejsy API:
Jeśli pojawi się taka prośba, zaloguj się na konto, któremu chcesz przyznać dostęp i autoryzację. W przeciwnym razie sprawdź, czy bieżący użytkownik w prawym górnym rogu to konto klienta lub konto menedżera, dla którego chcesz uzyskać dane logowania.
Pojawi się komunikat informujący, że Twoja aplikacja chce zarządzać kampaniami Search Ads 360. Aby kontynuować, kliknij Zaakceptuj.
Na karcie Krok 2. Wymień kod autoryzacji na tokeny powinien pojawić się kod autoryzacji. Kliknij Kod autoryzacji wymiany dla tokenów.
Jeśli wszystko pójdzie dobrze, token odświeżania i token dostępu powinny być wypełnione (być może trzeba będzie ponownie rozwinąć sekcję Krok 2. Wymień kod autoryzacji na tokeny):
Skopiuj token odświeżania do pliku konfiguracji wybranej biblioteki klienta, a także identyfikator klienta i tajny klucz klienta.
Usuwanie Playground OAuth2 z identyfikatora klienta
Teraz, gdy masz token odświeżania, nie musisz już używać domeny Playground OAuth2 jako autoryzowanego identyfikatora URI przekierowania. Aby usunąć go z listy autoryzowanych identyfikatorów URI przekierowania:
Na stronie Uprawnienia kliknij Nazwa identyfikatora klienta, aby ją edytować.
Usuń https://developers.google.com/oauthplayground z sekcji Autoryzowane identyfikatory URI przekierowania. Pamiętaj, że musisz pozostawić co najmniej jeden identyfikator URI przekierowania.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-06-04 UTC."],[[["The OAuth2 Playground enables manual creation of OAuth2 tokens for single manager account or Google Ads user access."],["To use the OAuth2 Playground, you need a client ID and client secret generated for a web application in the Google API Console."],["Generate refresh and access tokens using the OAuth2 Playground by authorizing the Search Ads 360 Reporting API."],["Configure your client library using the generated refresh token, client ID, and client secret for Search Ads 360 API access."],["After obtaining the refresh token, remove the OAuth2 Playground from the authorized redirect URIs in your Google API Console project."]]],["To generate OAuth2 credentials via the OAuth2 Playground, first create a web application client ID and secret in the Google API Console, adding `https://developers.google.com/oauthplayground` as an authorized redirect URI. Next, navigate to the OAuth2 Playground, input your credentials, and select the Search Ads 360 Reporting API scope. Authorize the API, exchange the authorization code for tokens, and copy the refresh token, client ID, and client secret to your client library configuration. Finally, remove the OAuth2 Playground URI from your authorized redirect URIs.\n"]]