OAuth2 = User Permision Denied

59 views
Skip to first unread message

fp.mm...@gmail.com

unread,
Feb 1, 2019, 5:02:53 AM2/1/19
to AdWords API and Google Ads API Forum
I just started to use OAuth2 for authenticating my users. And I do not know is my error related to new login-customer-id header requirement or it something else?
My SOAP request looks like this:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
<soap:Header>
<ns1:RequestHeader
<ns1:developerToken>******</ns1:developerToken>
<ns1:userAgent>******</ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:clientCustomerId>***-***-****</ns1:clientCustomerId>
</ns1:RequestHeader>
</soap:Header>
<soap:Body>
<mutate
<operations>
<operator>ADD</operator>
<operand xsi:type="NegativeCampaignCriterion">
<campaignId>********</campaignId>
<criterion xsi:type="IpBlock">
<type>IP_BLOCK</type>
<ipAddress>77.77.77.77</ipAddress>
</criterion>
</operand>
</operations>
</mutate>
</soap:Body>
</soap:Envelope>


The OAuth authentication going good. I get refresh_token and access_token. But when doing mutate i get an error:
<soap:Envelope
<soap:Header>
<ResponseHeader
<requestId>000580d199108c1b0ac7c46abe0473e3</requestId>
<serviceName>CampaignCriterionService</serviceName>
<methodName>mutate</methodName>
<operations>1</operations>
<responseTime>92</responseTime>
</ResponseHeader>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:\'&lt;null&gt;\']</faultstring>
<detail>
<ApiExceptionFault
<message>[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:\'&lt;null&gt;\']</message>
<ApplicationException.Type>ApiException</ApplicationException.Type>
<errors
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AuthorizationError">
<fieldPath></fieldPath>
<trigger>&lt;null&gt;</trigger>
<errorString>AuthorizationError.USER_PERMISSION_DENIED</errorString>
<ApiError.Type>AuthorizationError</ApiError.Type>
<reason>USER_PERMISSION_DENIED</reason>
</errors>
</ApiExceptionFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>

Help me please. What am I doing wrong?

googleadsapi...@google.com

unread,
Feb 1, 2019, 6:00:31 AM2/1/19
to adwor...@googlegroups.com
Hi,

The error you are encountering indicates that the OAuth2 credentials you are using does not have access to the account you are making your call against. I would recommend that you recreate your OAuth2 credentials while in session or logged in as the email address which has access to that AdWords account to resolve this issue.

Let me know if this helps.

Thanks and regards,
Peter
AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/fa19874f-0c9b-48cd-84fa-edda796b5a37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

FP MMC

unread,
Feb 1, 2019, 6:07:55 AM2/1/19
to googleadsapi...@google.com, adwor...@googlegroups.com
Yes! You'r right. It was my mistake. Authenticate one adwords acc and tried to make mutate on another! Thanks.

пт, 1 февр. 2019 г. в 13:00, googleadsapi-forumadvisor via AdWords API and Google Ads API Forum <adwor...@googlegroups.com>:

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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to

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 and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/IkmTwSdClO8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages