Fatal error: Class 'Google\AdsApi\Common\OAuth2TokenBuilder' not found
I didn't want to add to the previous issue because I think it's different. I have gone through each step using Composer to get these files. I have uploaded them to a website and have moved the adsapi_php.ini file to a new directory. I am testing out GetCampaign.php but I'm getting this error: "Fatal error: Class 'Google\AdsApi\Common\OAuth2TokenBuilder' not found".
If I include the autoload.php file I get a different error that I'm missing clientID, refreshToken and clientSecret, but I have those in my adsapi_php.ini file.
Any help would be great!

Have you moved all the vendor/ directory generated after you install via Composer to the new place too?
And what's in your '/../../adwords/autoload.php'?
Generally, it's needed to be the vendor autoload, not the one we write by ourselves.
Best, Knack
I have renamed the directory to adwords and moved it to my website via ftp after I downloaded all the files via Composer. Here is my autoload file. My adsapi_php.ini and autoload are in the same directory (/adwords/)

From the error message, it looks like your autoloading is not functioning correctly. Does it work on your local machine? Is it possible to run composer on the server instead?
I don't even know how to run it through my local machine...
No it's not possible to run composer on the server where the website is being hosted.
Can you download examples and try on local machine first? There are instructions in README.md in the tar file there that you can follow.
By the way, why do you need to rename the vendor directory?
I have the examples in the vendor directory already on my local machine. I just don't know how to run them... (I'm learning Adwords API).
I am also running Google Analytics Reporting API on the same website and it uses the directory Vendor and I didn't want to mix the two API's into one.
Everything is written in README, so please read through the whole guide first. :) If anything that you need is missing, please let us know.
For example, to run an example, you can follow these steps. Please let me know first if you can run it on your local machine.
For the vendor directory, if you have one composer.json file for your project and you do composer require for each GitHub repo, you don't need (and actually shouldn't) separate the vendor directories.
This can be possible cause why your project fails to detect OAuth2TokenBuilder.
Would I have to redownload the API via Composer to get a new autoload?
I'm getting a "Could not open input file: examples/AdWords/v201710/BasicOperations/GetCampaigns.php"
@fiboknacky, So I should combine my vendor directories? What would I need to put into my composer.json?
Hello @steponafish
Let's tackle one issue at a time. :)
Would I have to redownload the API via Composer to get a new autoload? I'm getting a "Could not open input file: examples/AdWords/v201710/BasicOperations/GetCampaigns.php"
I suppose you get started cleanly in your local machine. So, use any location in your computer that doesn't contain any files.
And have you followed the steps I mentioned closely? In what step did you get that error? The last one? If so, can you describe your directory structure? What are in your directory?
I have successfully downloaded via composer and have moved it into my web environment as it's own directory /adwords/. You mentioned that I can combine my Google Analytics Reporting API with this directory. Do you know if any files will be overwritten?
Glad that you could resolve that. If you really need to copy files over, I recommend you to try installing both libraries on your local machine first via Composer. It will take care of everything for you. In case two libraries share some dependencies, they'll just use the same set of code.
Only when there are some conflicts, e.g., the two libraries use the same dependency but different versions, you will get error messages during running Composer. At that time, you need to fix them case by case.
I'm going to close this as the main issue is already resolved.
Fatal error: Interface 'Google\AdsApi\Common\AdsBuilder' not found in /storage/ssd1/493/4996493/public_html/googleads-php-lib-master/googleads-php-lib-master/src/OAuth2TokenBuilder.php on line 29
My Ads Google/AdsApi/Common Not found how can i set own path in qauthbuilder2 file please let me know