Hello Joseph, You will be able to use OAuth2TokenBuilder <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fgoogleads%2Fgoogleads-php-lib%2Fblob%2Fmaster%2Fsrc%2FGoogle%2FAdsApi%2FCommon%2FOAuth2TokenBuilder.php%23L67&sa=D&sntz=1&usg=AFQjCNFqvmBFOwhWI6bFkwlBWk_0upe2DQ> and AdWordsSessionBuilder <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fgoogleads%2Fgoogleads-php-lib%2Fblob%2Fmaster%2Fsrc%2FGoogle%2FAdsApi%2FAdWords%2FAdWordsSessionBuilder.php%23L104&sa=D&sntz=1&usg=AFQjCNFB1VCeLZPdNu2hwWc5vQ14fySejg> to pass the values programmatically.
$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 <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fgoogleads%2Fgoogleads-php-lib%2Fissues&sa=D&sntz=1&usg=AFQjCNE8HVWJ1MRGidnFrE0iknYxe9Q1VQ> 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: > > Hi support, > > > while trying to migrate Adwords API to v201708 , Iam stuck of how to pass > outh data stored in my database to API > > $oAuth2Credential = (new OAuth2TokenBuilder()) > ->fromFile() > ->build(); > > $session = (new AdWordsSessionBuilder()) > ->fromFile() > ->withOAuth2Credential($oAuth2Credential) > ->build(); > > > > Could someone help me to solve this issue. > > > > Thanks, > > Joseph > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/d549b4e2-0a33-4dc5-89ce-c16379ce5e7d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.