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:

Log in to your AdWords account and open the following URL: 
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=239133760842-k074cjmhr15hfn347ugald8j9ekp4bip.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadwords&access_type=offline
 
After approving the token enter the authorization code here: Your OAuth2 
Credentials are incorrect. Please see the GetRefreshToken.php example. { 
"error" : "invalid_request", "error_description" : "Missing required 
parameter: code" }

If I go to that URL, I see an error: 

400. That’s an error.

Error: redirect_uri_mismatch

Application: [my-app]

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 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/34b75d7e-5961-41e5-baef-62deb3cf035c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to