Hi Pawan,

The client ID and client secret can be from any account. They do not impact 
authorization at all. Therefore, you can use the client ID and client 
secret from your prod account's (or any other account's) Cloud Console.

The important piece is which account you were logged in as when you clicked 
*Accept* on the OAuth prompt in the browser. The error you're getting 
suggests that you were not logged in as a user with access to the test 
account. Please go through the OAuth refresh token generation process 
again, and this time use an incognito/private window when navigating to the 
OAuth URL, then make sure you are logged in as a user with access to your 
test account.

Thanks,
Josh, AdWords API Team

On Friday, April 3, 2015 at 1:19:53 PM UTC-4, Pawan Yadav wrote:
>
> Hi Josh- I am sure this might have been asked multiple time but I am still 
> not able to find a working solution for my problem .
>
> I am trying to test the google adwords API connectivity and my Prod 
> account( of which Token is still in Pending status) . So i tried to use a 
> test account to test connection but I am getting 
> (oauth2client.client.AccessTokenRefreshError: 
> unauthorized_client) error . 
>
> i am using this code present on python adword github Repo (
> https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/authentication/create_adwords_client_without_yaml.py)
>  
> to test the connection . Below is what i used (based on instruction i found 
> online ):
>
> CLIENT_ID : Prod account
> CLIENT_SECRET : Prod account 
> REFRESH_TOKEN : Test account(Generated using  test account CLIENT_ID AND 
> CLIENT_SECRET script(
> https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/authentication/generate_refresh_token.py
> ))
> DEVELOPER_TOKEN :Prod account(Pending)
> CLIENT_CUSTOMER_ID: Test account 
>
> Can you help me in identifying what might be causing the authentication 
> failure 
>
> Thanks 
> Pawan
>  
> On Tuesday, May 20, 2014 at 3:50:19 PM UTC-4, Prashant Yadav wrote:
>>
>> Hi,
>>
>> I have created a MCC (Prod) account (Customer ID: 106-493-3461). Also 
>> created a MCC Test Account (Customer ID: 237-223-9575).
>> Developer token for both of these accounts is Pending approval.
>> I am trying to generate a Refresh Token, using the sample code from the 
>> java-code-lib. Here are the settings in my ads.properties file:
>>
>> api.adwords.refreshToken=
>>
>> api.adwords.clientId=<Client ID from Test Account>
>>
>> api.adwords.clientSecret=<Clinet Secret from TEST Account>
>>
>> api.adwords.clientCustomerId=106-493-3461 (PROD CustomerID?)
>>
>> api.adwords.userAgent=<Some URL>
>>
>> api.adwords.developerToken=<developer token from PROD Account>
>>
>> Do these properties look OK? I am getting error as in the Subject line.
>>
>>
>> Regards
>>
>> Prashant Yadav
>>
>> www.prashantyadav.com
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/acdcd3c2-0cbc-4a8d-8015-4bb9e05c2ed4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to