test account and .yaml configuration in Google Ads API

315 views
Skip to first unread message

Kevin

unread,
Oct 22, 2020, 9:13:05 PM10/22/20
to AdWords API and Google Ads API Forum
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 following 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:

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

Thanks!

Google Ads API Forum Advisor Prod

unread,
Oct 23, 2020, 11:24:40 AM10/23/20
to kjay...@gmail.com, adwor...@googlegroups.com

Hi Kevin,

Thank you for reaching out. The "client_id" and "secret_id" are the ones created in the Google Ads Console. Please refer to this guide on how to create them. One more useful resource is this guide which shows you how to configure your yaml file.

Thanks and regards,
Xiaoming, Google Ads API Team


Google Logo
Xiaoming
Google Ads API Team
 

 

ref:_00D1U1174p._5004Q26BWSy:ref

Kevin

unread,
Oct 23, 2020, 5:22:20 PM10/23/20
to AdWords API and Google Ads API Forum
Hey Xiaoming,

Will the "client_id" and "client_secret" need to be created by the same email that created the Test Account and campaigns?  Do I need to the author of the test manager account?  I am getting the following error:

Error with message "User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#login-customer-id".

I have already tried to set the login_customer_id to both the "customer ID" and the "manager account customer ID"

Google Ads API Forum Advisor Prod

unread,
Oct 26, 2020, 10:47:01 AM10/26/20
to kjay...@gmail.com, adwor...@googlegroups.com

Hi Kevin,

Thank you for reaching out. It would be better if the "client_id" and "client_secret" are created by the manager account that you used to create the test account. The refreshToekn has to be created by using the manager account that has the access to the account you are calling API against. 



Thanks and regards,
Xiaoming, Google Ads API Team


Reply all
Reply to author
Forward
0 new messages