RE: acceptInvitation() in LinkManagerToClient API not working...

28 views
Skip to first unread message
Message has been deleted

Google Ads API Forum Advisor

unread,
Sep 15, 2021, 1:12:36 AMSep 15
to a.ka...@sweply.com, adwor...@googlegroups.com

Hello Amol,

Thank you for reaching out to us.

Looking on the error provided, I can see that you've encountered the USER_PERMISSION_DENIED error which signifies that the authorized customer does not have access to the operating customer. With that, could you confirm if the OAuth2 credentials being used was generated from a user’s email address that has an access to the login-customer-id found in your API request header? Also, could you confirm if the login-customer-id is correct (as the manager account ID without hyphens)? If indeed the user has the right access credentials to the login-customer-id but still encounters the same error, could you provide us the following details below so our team can further check?

  • Complete request and response (with request-id) logs
  • Email Address used to authenticate the API call
  • Customer ID of the authenticated user

You can enable logging by following this guide. You can then send those requested details via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

As an aside, I will be removing your original post as it contains the request ID. Moving forward, please send logging details privately or to the email alias (as mentioned above). Below is a copy of your post.

"Hi,

I'm using Google Ads Php V8 library. In LinkManagerToClient API, createInvitation() & getManagerLinkResourceName() both functions work proper but acceptInvitation() function not working. I'm getting following error -

Request with ID xxxxxxxx has failed.

Google Ads failure details:

authorization_error : 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

Pls help me to fix it. I want to automate link process so that customer manually no need to accept after link by manager. API will handle it.

Regards,

Amol"

Regards,

Google Logo
Mark Kevin Albios
Google Ads API Team
 


ref:_00D1U1174p._5004Q2NTwKy:ref

Amol Kawale

unread,
Sep 15, 2021, 2:55:13 AMSep 15
to AdWords API and Google Ads API Forum
I have just replied to author as you mentioned in last reply. Pls confirm you received it...

Google Ads API Forum Advisor

unread,
Sep 15, 2021, 9:33:44 PMSep 15
to a.ka...@sweply.com, adwor...@googlegroups.com
Hi Amol,

Thank you for providing the requested details privately, our team was able to receive it.

Upon checking the provided API logs, I can see that the client customer ID 390-714-4090 is the one that was set in the login-customer-id field, not the manager account 807-384-0941. With this, you need to ensure that the configuration of the ini file is saved before running the API request again so it will process the customer ID of the manager account.

If the error persists, could you provide the login user account that you've used to generate Oauth2 credential and the updated API logs to further investigate? Please provide it via Reply privately to author option.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2NTwKy:ref

Amol Kawale

unread,
Sep 16, 2021, 1:16:52 AMSep 16
to AdWords API and Google Ads API Forum
Thanks for reply.

 As per your last message we need to change manager account id with login-customer-id field but how for each user who want to link his account to our manager account, during acceptInvitation()  how we can change config file setting for each user run time for each customer. later on again we need to revert it for our manager account. Pls guide us. Your help is highly appreciated.

Regards,
Amol

Google Ads API Forum Advisor

unread,
Sep 17, 2021, 12:08:09 AMSep 17
to a.ka...@sweply.com, adwor...@googlegroups.com

Hello Amol,

Thanks for getting back to us.

In the Google Ads API's perspective and as mentioned by Ernie on the previous thread, the manager account ID should be indicated in the login-customer-id field. Since you're having troubles on the acceptInvitation() function from the PHP client library, we suggest that you raise this concern to the client library owners via this link instead. Implementation concerns related to the client library is already out of our expertise and the client library owners should be able to further assist you on this.

Regards,

Google Logo
Mark Kevin Albios
Google Ads API Team
 


ref:_00D1U1174p._5004Q2NTwKy:ref
Reply all
Reply to author
Forward
0 new messages