Hello Joseph,
$oAuth2Credential = (new OAuth2TokenBuilder())
->withClientId("OAUTH_2_CLIENT_ID")
->withClientSecret("OAUTH_2_CLIENT_SECRET")
->withRefreshToken("REFRESH_TOKEN")
->build();
// Construct an API session configured from the OAuth2 credentials above.
$session = (new AdWordsSessionBuilder())
->withDeveloperToken("DEVELOPER_TOKEN")
->withOAuth2Credential($oAuth2Credential)
->withClientCustomerId("CLIENT_CUSTOMER_ID")
->build();
The OAuth2TokenBuilder will fetch the access tokens when required. The AdWordsSessionBuilder uses the oAuth2Credential object to build the AdsSession. If you have any further questions, I'd suggest that you post your concern on the
library's issue tracker so the library owners can help you out.
Thanks,
Bharani, AdWords API Team
On Monday, September 18, 2017 at 8:08:14 AM UTC-4, silvester correya wrote: