how to change the values inside auth.ini based on the user

152 views
Skip to first unread message

Shobhan Babu

unread,
Feb 5, 2015, 6:45:56 AM2/5/15
to adwor...@googlegroups.com
Hi


I am using Adwords api in my web application and I want to change the credentials of auth.ini file based on the user login.How can we change the auth.ini file credentials dynamically based on the user.Or is there any replacement for auth.ini file in the Adwords api

Is it possible to change the values of auth.ini values dynamically ?

Please let me know the procedure to solve  this problem.

Thank you ! 

Anash P. Oommen (AdWords API Team)

unread,
Feb 5, 2015, 7:09:47 AM2/5/15
to adwor...@googlegroups.com
Hi Shobhan,

The AdWordsUser class has lots of methods to override auth.ini values at runtime. See https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/AdWords/Lib/AdWordsUser.php#L256 for details.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Shobhan Babu

unread,
Feb 5, 2015, 11:35:54 PM2/5/15
to adwor...@googlegroups.com
Without using the auth.ini file can we use these credentials in other way ?

Josh Radcliff (AdWords API Team)

unread,
Feb 9, 2015, 10:20:14 AM2/9/15
to adwor...@googlegroups.com
Hi,

As Anash mentioned in his post, the AdWordsUser in the PHP library has multiple Set... methods for configuring a user programmatically. See also the comments in auth.ini for an example of setting the ClientCustomerId attribute. Setting other attributes will follow a similar pattern.

Cheers,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages