Google\AdsApi\Common\OAuth2TokenBuilder

51 views
Skip to first unread message

bl...@catchmarketingservices.com

unread,
Feb 19, 2018, 3:36:49 PM2/19/18
to AdWords API Forum
I've seen this question asked a few times and followed what was being said but had no luck.

- I successfully installed via composer and have verified that the src/Google/AdsApi/Common folder is there and it does contain OAuth2TokenBuilder.php.  I suspect that my path is wrong but it does load vendor/autoload.php. It even returns a long array in return $loader from autoload_real.php. But for some reason it can't find that Class for the Token Builder. attached is a screenshot of my file structure.  Anyone have any suggestions?


oauth2.png

Vincent Racaza (AdWords API Team)

unread,
Feb 19, 2018, 11:11:00 PM2/19/18
to AdWords API Forum
Hi,

Normally, for PHP client library, if the error being generated states that it cannot find a certain class, then it means that the dependencies are not fully installed/downloaded. I have also encountered this issue before for the OAuth2TokenBuilder when I installed the latest PHP client library locally. What I did to resolve the issue was to install again the client library using composer as you can see on this guide just to make sure that all dependencies are downloaded.

On your end, if you haven't, can you try to install the client library again based on that guide and let me know if the issue still persists?

Thanks,
Vincent
AdWords API Team

bl...@catchmarketingservices.com

unread,
Feb 20, 2018, 8:55:34 AM2/20/18
to AdWords API Forum
You are correct. I had all the dependencies in vendor and autoload installed fine via command line but we were ftping the master files for the project from Git Hub. It seems that the download to zip from that source is incomplete. When doing a fresh install of googleads-php-lib-master from command line I was able to generate different error codes that I could then work through. After a long night we finally have success. Anyone reading this in the future I would encourage not to download/upload the library via ftp, as it was a pretty quick install once I stopped doing it that way. As a php coder who only dabbles in SSH/server admin, I found the 4 step instructions here (https://github.com/googleads/googleads-php-lib/issues/346) to be the easiest to follow. Thanks Vincent for your prompt reply and patient help.

-Blair
Reply all
Reply to author
Forward
0 new messages