auth.ini how to set up?

412 views
Skip to first unread message

Fang Abel

unread,
Jun 11, 2014, 10:53:41 PM6/11/14
to adwor...@googlegroups.com
developerToken = "INSERT_DEVELOPER_TOKEN_HERE"
userAgent = "INSERT_COMPANY_NAME_HERE"


[OAUTH2]
client_id = "INSERT_OAUTH2_CLIENT_ID_HERE"
client_secret = "INSERT_OAUTH2_CLIENT_SECRET_HERE"
refresh_token = "INSERT_OAUTH2_REFRESH_TOKEN_HERE"

How to set the parameters of the above? I know client_id and client_secret.  developerToken & userAgent & refresh_token From there View?

Michael Cloonan (AdWords API Team)

unread,
Jun 12, 2014, 9:08:27 AM6/12/14
to adwor...@googlegroups.com
Hello,

The developerToken is a string associated with your MCC, that must be approved, that would grant you access to perform API operations. You can read more information about how to get a developer token at our guide on signing up.
The userAgent is a custom string that uniquely identifies your platform. This is not something that comes from Google, but something that you can set.

The client_id and client_secret are retrieved through the Google Developer Console.
The refresh_token is obtained using the client_id and client_secret. You can use one of our utilities in this section of the OAuth 2.0 guide to generate the refresh token.

Let me know if you have any more questions or need more detailed instructions about any of these steps.

Regards,
Mike, AdWords API Team

michaelan...@gmail.com

unread,
Nov 29, 2016, 9:34:43 AM11/29/16
to AdWords API Forum
Hi.

Do all these parameters need to belong to a single account only?
Or can some of these parameters belong to other account and some belong to another?

Thank you.

Michael Cloonan (AdWords API Team)

unread,
Nov 29, 2016, 9:53:03 AM11/29/16
to AdWords API Forum
Hello,

Most of the information that goes in the auth.ini file isn't related to any AdWords account. Your developer token authenticates that you're allowed to make API calls. The client ID and client secret tell the server what application is making the call.

The refresh token authenticates you as a user of a specific account, usually a manager account which gives you access to all child accounts within it. You can specify this on the fly to manage multiple accounts with separate refresh tokens.

Similarly, the client customer ID field tells the API what specific account you want to modify. If you want to act on multiple accounts, you can modify which account you're accessing on the fly.

You can find an example of how to set this all up programmatically instead of with the .ini file here: https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/Auth/CreateAdWordsUserWithoutIniFile.php

Regards,
Mike, AdWords API Team
Reply all
Reply to author
Forward
0 new messages