AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'<null>

2,054 views
Skip to first unread message

Prashant Yadav

unread,
May 20, 2014, 3:50:19 PM5/20/14
to adwor...@googlegroups.com
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

Josh Radcliff (AdWords API Team)

unread,
May 21, 2014, 1:20:03 PM5/21/14
to adwor...@googlegroups.com
Hi Prashant,

This looks like it may be a duplicate of your other post -- please see my reply there.

Regarding the specific properties mentioned below, the following properties should come from your PROD account:
  • api.adwords.clientId
  • api.adwords.clientSecret
  • api.adwords.developerToken
The value for api.adwords.clientCustomerId should be your TEST account.

Cheers,
Josh, AdWords API Team

Albert Maranian Jr.

unread,
Sep 12, 2014, 12:27:27 AM9/12/14
to adwor...@googlegroups.com
This is getting more confusing, so client ID and secret will actually need to be generated from the production account? I thought the developer token will only be needed from production?

Josh Radcliff (AdWords API Team)

unread,
Sep 12, 2014, 10:16:26 AM9/12/14
to adwor...@googlegroups.com
Hi,

The clientId and clientSecret can come from any account, but we generally encourage people to use their production account for those so that when they want to switch over to issuing requests against their production AdWords account, all they have to change are the api.adwords.clientCustomerId and api.adwords.refreshToken values.

Cheers,
Josh, AdWords API Team

Pawan Yadav

unread,
Apr 3, 2015, 1:19:53 PM4/3/15
to adwor...@googlegroups.com
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

Josh Radcliff (AdWords API Team)

unread,
Apr 3, 2015, 3:35:20 PM4/3/15
to adwor...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages