Before trying with the production data, I'm going to try using the Google Ads API with a test account. I have already set up that and I have the Customer ID, manager account customer ID, and the developer token. The next step in the docs states I need to set up the .yaml file which has the follwing fields:

developer_token: INSERT_DEVELOPER_TOKEN_HERE client_id: INSERT_OAUTH2_CLIENT_ID_HERE client_secret: INSERT_OAUTH2_CLIENT_SECRET_HERE refresh_token: INSERT_REFRESH_TOKEN_HERE login_customer_id: INSERT_LOGIN_CUSTOMER_ID_HERE 

My question here is what is the client_id and client_secret? I know that the refresh_token needs to set up like this in their docs: https://developers.google.com/google-ads/api/docs/client-libs/python/oauth-installed

Is the client_id and secret_id the OAuth 2.0 Client IDs setup in the my personal account in the developer console?

*I am using the Google Ads API and NOT the AdWords API

Tag:google-ads-api, python, python-3.x

4 comments.

  1. dorian

    From what I understand, you were able to successfully perform an OAuth2 authorization flow with the required scope https://www.googleapis.com/auth/adwords in order to obtain your refresh token.

    The OAuth2 client ID and secret values that you set in googleads's configuration file are the exact same ones you used for the auth flow. I assume that's what you refer to as being setup in you personal account in the developer console.

  2. dko512

    I have contacted the GoogleAds Team and they confirmed that the client_id and client_secret are from the email account that has access to specified Test Account/Campaigns.

    1. dorian

      Strictly speaking, that's not true. You can setup OAuth2 clients with a Google account that has no access to Google Ads and still use them to create a refresh token with another Google account that does have access.

    2. dko512

      right, you can populate the refresh token even though you don't have access, but you will need to have access to the campaign if you want to have permission to see the data.

Add a new comment.