GenerateRefreshToken.php command line error

75 views
Skip to first unread message

Chris

unread,
Jan 13, 2017, 3:35:24 PM1/13/17
to AdWords API Forum
I'm trying to generate a refresh token but I'm getting the following error AFTER I have added my client id and client secret. I downloaded the .zip file for adwords api library, but I'm not familiar with composer so I did not install using composer. 

Do I need to install another library for OAuth2?

PHP Fatal error:  Class 'Google\Auth\OAuth2' not found in /var/www/vhosts/mywebsite.com/googleads-php-lib-master/examples/Auth/GetRefreshToken.php on line 97



Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jan 13, 2017, 4:07:58 PM1/13/17
to AdWords API Forum
Hi Chris, 

Using composer to download the latest version of the client libraries as mentioned in step 1 of the setup document  will ensure that all the required dependencies are in place. Directly downloading them might fail to configure these dependencies. 

Please try this and let me know if you face any issues. 

Thanks,
Sreelakshmi, AdWords API Team

Chris

unread,
Jan 13, 2017, 5:08:43 PM1/13/17
to AdWords API Forum
Do you recommend that I totally delete the zip file that I have in my website root?

Should I be navigating to the website root in SSH before running the composer install command?

Thanks

Joyce Lava

unread,
Jan 15, 2017, 10:51:56 PM1/15/17
to AdWords API Forum
Hi Chris,

I will provide support to you while Sreelakshmi is on OOO. Since your question is more of the client library setup concern, please contact the PHP client library github experts through this link as they are more equipped with this.

Thanks,
Joyce, AdWords API Team
Reply all
Reply to author
Forward
0 new messages