Hi Chirag,

The simplest way to pass OAuth2 configuration to the AdWordsUser is to use 
an empty constructor and call the setter ->SetOAuth2Info. For an example of 
this, pelase see the OAuth2 
example<https://code.google.com/p/google-api-adwords-php/source/browse/trunk/examples/v201209/Misc/UseOAuth2.php>
.

Please bear in mind, that to process the OAuth2 user journey offline, 
you'll need to first obtain a refresh token online. For more information on 
this please see the OAuth2 Information 
<https://developers.google.com/accounts/docs/OAuth2WebServer#offline>page.

A quick example of configuring the user could be:

$user = new AdWordsUser();
$user->SetOAuth2Info(array(
    'client_id'     => '8819981768.apps.googleusercontent.com',
    'client_secret' => '************************',
));
$authorizationUrl = $user->GetOAuth2AuthorizationUrl(NULL, TRUE);
...

Currently the AdWords client library alone doesn't support serviced 
accounts.

Regards,

- Paul, AdWords API Team.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en



Reply via email to