Downloading PHP API library and location of adsapi_php.ini file

508 views
Skip to first unread message

ch...@thinkchris.ca

unread,
Jan 13, 2017, 12:33:20 PM1/13/17
to AdWords API Forum
Hi friends. I'm in the early stages of working with the Adwords API. I have simply downloaded the PHP files from GitHub... I'm not familiar with how to do this via composer.

Questions...

1. Is it ok to just download and place the files on the server?

2. I have made changes to my adsapi_php.ini file (found in the /examples/Auth folder) and moved it to my website root. Is this correct?


Also, I'm really stuck trying to Generate the Refresh Token. I have tried to run GenerateRefreshToken.php from the command line, but I get an error...

require(../../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite.com/googleads-php-lib-master/examples/Auth/GetRefreshToken.php on line 19
.

Shwetha Vastrad (AdWords API Team)

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

Yes, you need to copy the config file (adsapi_php.ini) to your home directory and use fromFile() on builders to load this file from home directory. You can then follow the instructions provided here to set up OAuth2 for your application. I have addressed your other issue about generating a refresh token on the other thread. Please let me know if you are able to generate a refresh token successfully. 

Regards,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages