It seems there is problem with GetRefreshToken.php (at least with the
version we were using). So,

Forget about execution of GetRefreshToken.php
Instead, go to this URL : https://developers.google.com/oauthplayground/
Click on the SETTINGS icon on top right
CHECK mark Use your own OAuth credentials
Provide "OAuth Client ID" and "OAuth Client Secret" you have
Click on close
Next, on
Step 1Select & authorize APIs

Fill the input box(the box with watermark text '*Input your own scopes*'
with "https://adwords.google.com/api/adwords/";

Then, click on Authorize APIs

Now,
Step 2Exchange authorization code for tokens


The above step will be populated with Authorization Code

Again click on Exchange authorization code for tokens in the same step

The required Refresh Token and Access Token gets populated


The same can be used on your client applications to consume ADWORDS APIs


Hope this works. If not, let me know with specifications, I will be glad to
have a look.



On Sat, Mar 28, 2015 at 11:21 PM, Akhmad Bayquni <[email protected]>
wrote:

> Can i know what you do in case 1? I have same problem. And it my first
> time for using Adwords API. I need help. :)
>
>
> Pada Jumat, 10 Januari 2014 19.54.53 UTC+7, Doubt Dolson menulis:
>>
>> Hi,
>>
>> As we were trying to get API access, we did follow the following
>> procedure but with only failure.
>>
>> We got error messages at two places while
>>
>>
>>
>> *1. Trying to get Authorization Code 'Error: redirect_uri_mismatch' 2.
>> Trying to get Refresh Token 'Error: invalid_grant'   *
>> --------CASE # 1 :
>>    We have an active MCC account
>>    We are using Adwords PHP Client Library v201309
>>    We have valid and approved developer token
>>    We have generated client_id and client_secret using  URL :
>> https://code.google.com/apis/console#access for Web Application
>>    We went to command line and executed GetRefreshToken.php
>>    We got URL to execute
>>    We  executed ,we got error #1*'Error: redirect_uri_mismatch'*
>>
>> --------CASE # 2 :
>>    From case # 1, We got URL to execute
>>    We replaced redirect_uri manually by replacing with one of the urls
>> defined as redirect urls during client id/secret generation
>>    We executed the modified URL
>>    We got an interface where it asked if we want to allow access to the
>> application we defined
>>    We allowed *Clicked on allow button*
>>    We got an authorization code
>>    We supplied the same to the GetRefreshToken.php file as $code
>>    Again, we got an error *'Error: invalid_grant' *
>>
>> We are not able to move ahead from this point. So, any help would be
>> appreciated.
>>
>> Note:
>>     With the same developer token, we are able to fetch data from a test
>> MCC Account.
>>
>> Thanks,
>> Deepak
>>
>  --
> --
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 a topic in the
> Google Groups "AdWords API Forum" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/adwords-api/pv9y3nTI89s/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> Visit this group at http://groups.google.com/group/adwords-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/adwords-api/0ae076d5-8bb0-49f3-a0a5-905f712f08b3%40googlegroups.com
> <https://groups.google.com/d/msgid/adwords-api/0ae076d5-8bb0-49f3-a0a5-905f712f08b3%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CADcCdwOFRn7AhK3L5g__E%3DgHUJDL7YaPEunyDJCfTVreCwchLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to