Dear all,
I'm trying to run some examples from adwords api (v201509) client lib on my web server, but I'm not able to get refresh_token.
I've checked that my server does support SOAP, cURL and openSSL on php 5.6+
Here are the steps I took:
- I have created adwords manager account to get developers token and added my existing adwords account to it.
- Then I realised I need a test account, so I've created another adwords manager account (test) and created child adwords account (test) . However I don't have an option to see developers token in this test account. As it says on the "get started" page, I can use developers token from the account I've created in the first step (non-test account) . But I don't really understand how these two accounts are connected? My live and test adwords account managers has different login details.
- Then I have logged into google developers console with the same details I use to log in to adwords manager, created a new project and generated new client_id and client_secret for web access
When I try to run this file on my server: googleads-php-lib-master/examples/AdWords/Auth/GetRefreshToken.php
I get the following response:
If I go to that URL, I see an error:
Error: redirect_uri_mismatch
You can email the developer of this application at: [my-email]
The redirect URI in the request: urn:ietf:wg:oauth:2.0:oob can only be used by a Client ID for native application. It is not allowed for the 'WEB' client type. You can create a Client ID for native application in the Credentials section of the Google Developers Console.
However my credentials were generated for the web access
Any help would be appreciated