Posts tagged with oauth2-playground

While authorizing my Google Ads Account using OAuth Playground to retrieve a lifetime refresh token which could used to further create access tokens, the authorization is throwing This app is blocked security error. I think this is because the GCP OAuth consent screen is not verified. But how do I verify my OAuth consent screen when I don't have an App domain name, since I'm using this as a one time activity to retrieve my refresh token using OAuth Playground?

  1. Does anybody know after how much time or how many requests does refresh token expires in Google ads API? I created refresh token here https://developers.google.com/oauthplayground.
  2. Does anyone know what is the impersonated email in server account in Google ads API? I created server account in Google cloud project. If I run python code with Service Account configuration with generated json_key_file_path and same impersonated_email as my email account with which I created project then I get an error google.auth.exceptions.RefreshError: ('unauthorized_client: Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.', {'error': 'unauthorized_client', 'error_description': 'Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.'}). If I put for impersonated_email client_email that I got from generated jon file I get an error: User in the cookie is not a valid Ads user.

There are only a few RPC methods that include the HTTP reference endpoint in the reference documentation.

I got the Google Ads Service's Mutate method to work with https://googleads.googleapis.com/v3/customers/{customer-id}/googleAds:mutate

However, trying to call the Keyword Plan Idea service fails, reporting there is no such URL on the server:

https://googleads.googleapis.com/v2/customers/{customer-id}/keywordPlanIdea:generateKeywordIdeas

I have tried it with and without the customers/{customer-id}, and with GET, POST, and even PUT. No luck.

Does anyone know the correct endpoint?

Thanks!

John