Re: Dynamically changing ClientId in order to access multiple accounts
Hi Ray, I've tried passing directly both xxx-xxx- and xx and neither works. I've tried to comment out the clientCustomerId line in the auth.ini file but that returns an error. Leaving the CID in the auth.ini and trying to specify a different CID in the script as $user-SetClientId(xxx-xxx-); simply ignores this line and uses the CID in the auth.ini. On Wednesday, April 9, 2014 9:22:30 PM UTC+1, Ray Tsang (AdWords API Team) wrote: Visar, $_GET() probably returned something invalid. Try passing in CID directly, such as: $user-SetClientId(xxx-xxx-); Cheers, Ray On Wednesday, April 9, 2014 5:31:58 AM UTC-4, Visar wrote: Hi Guys, I just posted this, but I can't see it so I'm sorry if it dupes. Language PHP: I'm trying to access all the accounts in my MCC and so I'm looking for a way to dynamically change the ClientId from within the script file. I saw this in another thread $user = new AdWordsUser(); // Load whatever settings is there in auth.ini. $user-SetClientId($_GET[xxx-xxx-]); // Set specific values as override. I tried it out but get the following error Notice: Undefined index: xxx-xxx- What am I doing wrong? The end goal is to be able to pass the ClientId as the parameter of a function, and so using one script be able to access all accounts in my MCC. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Dynamically changing ClientId in order to access multiple accounts
My apologies. Please refer to the source code and/or PHP doc, or the configuration file itself: https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/AdWords/auth.ini#L11 It should be SetClientCustomerId(...). Cheers, Ray On Thursday, April 10, 2014 4:27:03 AM UTC-4, Visar wrote: Hi Ray, I've tried passing directly both xxx-xxx- and xx and neither works. I've tried to comment out the clientCustomerId line in the auth.ini file but that returns an error. Leaving the CID in the auth.ini and trying to specify a different CID in the script as $user-SetClientId(xxx-xxx-); simply ignores this line and uses the CID in the auth.ini. On Wednesday, April 9, 2014 9:22:30 PM UTC+1, Ray Tsang (AdWords API Team) wrote: Visar, $_GET() probably returned something invalid. Try passing in CID directly, such as: $user-SetClientId(xxx-xxx-); Cheers, Ray On Wednesday, April 9, 2014 5:31:58 AM UTC-4, Visar wrote: Hi Guys, I just posted this, but I can't see it so I'm sorry if it dupes. Language PHP: I'm trying to access all the accounts in my MCC and so I'm looking for a way to dynamically change the ClientId from within the script file. I saw this in another thread $user = new AdWordsUser(); // Load whatever settings is there in auth.ini. $user-SetClientId($_GET[xxx-xxx-]); // Set specific values as override. I tried it out but get the following error Notice: Undefined index: xxx-xxx- What am I doing wrong? The end goal is to be able to pass the ClientId as the parameter of a function, and so using one script be able to access all accounts in my MCC. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Dynamically changing ClientId in order to access multiple accounts
Hi Guys, I just posted this, but I can't see it so I'm sorry if it dupes. Language PHP: I'm trying to access all the accounts in my MCC and so I'm looking for a way to dynamically change the ClientId from within the script file. I saw this in another thread $user = new AdWordsUser(); // Load whatever settings is there in auth.ini. $user-SetClientId($_GET[xxx-xxx-]); // Set specific values as override. I tried it out but get the following error Notice: Undefined index: xxx-xxx- What am I doing wrong? The end goal is to be able to pass the ClientId as the parameter of a function, and so using one script be able to access all accounts in my MCC. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Dynamically changing ClientId in order to access multiple accounts
Visar, $_GET() probably returned something invalid. Try passing in CID directly, such as: $user-SetClientId(xxx-xxx-); Cheers, Ray On Wednesday, April 9, 2014 5:31:58 AM UTC-4, Visar wrote: Hi Guys, I just posted this, but I can't see it so I'm sorry if it dupes. Language PHP: I'm trying to access all the accounts in my MCC and so I'm looking for a way to dynamically change the ClientId from within the script file. I saw this in another thread $user = new AdWordsUser(); // Load whatever settings is there in auth.ini. $user-SetClientId($_GET[xxx-xxx-]); // Set specific values as override. I tried it out but get the following error Notice: Undefined index: xxx-xxx- What am I doing wrong? The end goal is to be able to pass the ClientId as the parameter of a function, and so using one script be able to access all accounts in my MCC. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups AdWords API Forum group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.