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.
Jedną z opcji generowania danych logowania OAuth2 jest użycie OAuth2 Playground. OAuth2 Playground w połączeniu z konsolą interfejsu Google Ads API umożliwia ręczne tworzenie tokenów OAuth2.
Plac zabaw OAuth2 jest przeznaczony dla użytkowników, którzy potrzebują dostępu do kont tylko w przypadku jednego konta menedżera lub użytkownika Google Ads. Jeśli musisz poprosić o dane logowania wielu użytkowników, lepiej skonfigurować bibliotekę klienta na potrzeby OAuth w Search Ads 360.
Uzyskiwanie identyfikatora i tajnego klucza klienta
W sekcji Krok 1. Wybierz i autoryzuj interfejsy API na liście kliknij 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ę prośba, zaloguj się na konto, do którego 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ę prośba o potwierdzenie, że aplikacja ma zarządzać Twoimi 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, pola Token odświeżania i Token dostępu powinny zostać wypełnione (może być konieczne ponowne rozwinięcie sekcji Krok 2. Wymień kod autoryzacji na tokeny):
Skopiuj token odświeżania do pliku konfiguracyjnego wybranej biblioteki klienta wraz z identyfikatorem klienta i tajnym kluczem klienta.
Usuwanie OAuth2 Playground z identyfikatora klienta
Teraz, gdy masz token odświeżania, nie musisz już używać narzędzia OAuth2 Playground jako autoryzowanego identyfikatora URI przekierowania. Aby usunąć go z listy autoryzowanych identyfikatorów URI przekierowania:
Na stronie Dane logowania kliknij nazwę identyfikatora klienta, aby ją edytować.
Usuń adres 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-09-03 UTC."],[[["\u003cp\u003eThe OAuth2 Playground enables manual creation of OAuth2 tokens for single manager account or Google Ads user access.\u003c/p\u003e\n"],["\u003cp\u003eTo use the OAuth2 Playground, you need a client ID and client secret generated for a web application in the Google API Console.\u003c/p\u003e\n"],["\u003cp\u003eGenerate refresh and access tokens using the OAuth2 Playground by authorizing the Search Ads 360 Reporting API.\u003c/p\u003e\n"],["\u003cp\u003eConfigure your client library using the generated refresh token, client ID, and client secret for Search Ads 360 API access.\u003c/p\u003e\n"],["\u003cp\u003eAfter obtaining the refresh token, remove the OAuth2 Playground from the authorized redirect URIs in your Google API Console project.\u003c/p\u003e\n"]]],["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"],null,[]]