Trying to generate a conversion throw USER_PERMISSION_DENIED error

236 views
Skip to first unread message

Isa

unread,
Dec 20, 2023, 2:55:38 PM12/20/23
to Google Ads API and AdWords API Forum
Hello, I'm trying to generate a conversion using the Google Ads API as indicated in the documentation. However, when invoking the conversions service, I'm getting the error USER_PERMISSION_DENIED.

I have an MCC (My Client Center) account that belongs to user A, and I want to add a new conversion to the account of user B. I've already generated the developer token for user A and have the JWT (JSON Web Token) from user B approving the action.

In the request, as well as in all the previous operations like linking the account, the same login-customer-id (that is, the one from client A) is being passed.

I'm attaching images with the information sent to the API and its response.

Hope you can help me.
Regards
Selection_021.png
Selection_025.png
Selection_022.png
Selection_023.png

Google Ads API Forum Advisor

unread,
Dec 20, 2023, 3:03:05 PM12/20/23
to isab...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your concern, I understand that you're facing a USER_PERMISSION_DENIED error. This means the user doesn't have permission to access the customer. According to the documentation, if you're accessing the customer please specify the login-customer-id as the manager account ID without hyphens (-). Client libraries have built in support for this. 

If still the issue persists, kindly provide us with the complete updated API logs (request and response logs with request-id and request header) generated at your end and uncropped UI screenshot of the Google Ads account where you are facing the issue.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

​​​​​​​You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02r2xDW:ref"

Thanks,
 
Google Logo Google Ads API Team

 

Isa

unread,
Dec 21, 2023, 11:31:49 AM12/21/23
to Google Ads API and AdWords API Forum
Sure, I already sent you the information requested.

Regards.

Google Ads API Forum Advisor

unread,
Dec 21, 2023, 2:35:01 PM12/21/23
to isab...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us. 

Upon checking logs, I understand that you are still getting an “USER_PERMISSION_DENIED” error. I would kindly request you to check if you have a correct access level to the Google Ads account that you are accessing and share the screenshot with us for further investigation. 

To analyze this issue further could you please provide us with the below details.
  • Can you please run List Accessible Customers and provide us complete API request and response logs, you may also check this API documentation for more information.
  • The user email used for authenticating the API query. 
  • Also, I would suggest you to send the logs as an attachment to this email thread. 

Isa

unread,
Dec 22, 2023, 1:28:16 PM12/22/23
to Google Ads API and AdWords API Forum
Hi, I  sent you the required information.

Regards

Google Ads API Forum Advisor

unread,
Dec 22, 2023, 3:56:40 PM12/22/23
to isab...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for getting back to us.

Can you please confirm which email address you are using to generate your Oauth credentials?

Kindly note that the email address that is used to generate Oauth credentials has access to the manager account. If this is the case, then you should not get this USER_PERMISSION_DENIED error. 

Isa

unread,
Jan 3, 2024, 10:50:46 AM1/3/24
to Google Ads API and AdWords API Forum
Hi, I sent you the requested information.

Regards.

Google Ads API Forum Advisor

unread,
Jan 3, 2024, 11:47:35 AM1/3/24
to isab...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us. 

To analyze this issue further could you please provide us with the below details.
  • Can you please run List Accessible Customers and provide us complete API request and response logs, you may also check this API documentation for more information.
  • The user email used for authenticating the API query. 
  • Also, I would suggest you send the logs as an attachment to this email thread. 
You can send the details via Reply privately to the author option, or direct private reply to this email.
 

Isa

unread,
Jan 8, 2024, 9:08:15 AM1/8/24
to Google Ads API and AdWords API Forum
Hi, do you need more information about this error?

Regards

Google Ads API Forum Advisor

unread,
Jan 8, 2024, 9:40:41 AM1/8/24
to isab...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Could you please confirm whether you are using client libraries? If yes, I would suggest you regenerate OAuth credentials while logging in as "cliengo...@gmail.com".

Isa

unread,
Jan 18, 2024, 7:52:42 AM1/18/24
to Google Ads API and AdWords API Forum
Hi, I sent you the information.

Regards

Google Ads API Forum Advisor

unread,
Jan 18, 2024, 1:11:33 PM1/18/24
to isab...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Upon checking the provided information, I could see that the Google Ads account which you are using for conversions is having test access. Please be informed that some features cannot be accessed with test accounts. I would recommend you refer to this Limitations of test accounts for more information related to your concern.

I would suggest you to upgrade your access level to Basic access or Standard access developer token to avoid this error. Also I would recommend you refer to this Access Levels and Permissible Use guide for more information related to access levels and their uses.

I hope this helps! Let us know if you have any other questions.

Isa

unread,
Jan 22, 2024, 7:31:25 AM1/22/24
to Google Ads API and AdWords API Forum
Hi, Yes It is a developer with low privileges, but even so, I can still create the conversion, the thing is that when I try for second time, the API throw that error and I can not continue testing in the next minutes.

This same scenario is happening in our production environment.
But I will open a new issue with the captures of  the errors for (I think) the same reason that still happen in low environments. 

I appreciate your time.

Regards.

Manish Jain

unread,
Jan 23, 2024, 4:29:10 PM1/23/24
to Google Ads API and AdWords API Forum
Same issue is happening with me too, as things are working normal to get spent per account but after upgrading API to V15 via,  composer require googleads/google-ads-php:21.1 then I started getting this issue.

get ApiException was thrown with message '{ "message": "The caller does not have permission", "code": 7, "status": "PERMISSION_DENIED", "details": [ { "@type": "type.googleapis.com\/google.ads.googleads.v15.errors.GoogleAdsFailure", "errors": [ { "errorCode": { "authorizationError": "USER_PERMISSION_DENIED" }, "message": "User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https:\/\/developers.google.com\/google-ads\/api\/docs\/concepts\/call-structure#cid" } ], "requestId": "UAo0n2LRjzMd8HJjKdc4rw" } ] }'.

Wondering , how it can get fix, or what changes I need to make,

any Idea what to do next?

I am using https://github.com/googleads/google-ads-php and upgraded it on 21.1

Thanks

Google Ads API Forum Advisor

unread,
Jan 24, 2024, 3:39:49 AM1/24/24
to mj...@avasflowers.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your concern, I understand that you're facing a USER_PERMISSION_DENIED error. This means the user doesn't have permission to access the customer. According to the documentation, if you're accessing the customer please specify the login-customer-id as the manager account ID without hyphens (-). Client libraries have built in support for this. 


If still the issue persists, kindly provide us with the complete updated API logs (request and response logs with request-id and request header) generated at your end and uncropped UI screenshot of the Google Ads account where you are facing the issue.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

If you have any further queries related to the Google Ads API, please open a new forum thread.


​​​​​​​You can send the details via Reply privately to the author option, or direct private reply to this email.
 
Reply all
Reply to author
Forward
0 new messages