Re: Why uploadConversionAdjustments API raises ACTION_NOT_PERMITTED error

2022-12-27 Thread Ryo
Hi Yasar,

Thanks for your quick reply.

I could solve the issue based on your advice.
Thanks a lot.

Best regards,
Ryo

2022年12月27日火曜日 19:18:41 UTC+9 adsapi:

> Hi Ryo,
>
> Thanks for reaching out to the Google Ads API Forum.
>
> The *AuthorizationError.ACTION_NOT_PERMITTED* 
> <https://developers.google.com/google-ads/api/reference/rpc/v10/AuthorizationErrorEnum.AuthorizationError#action_not_permitted>
>  
> error occurs when the user does not have permission to perform this action 
> (e.g., ADD, UPDATE, REMOVE) on the resource or call a method. You 
> encountered said error because you are using the credentials with adequate 
> access level. You may need to have at least standard *access level* 
> <https://support.google.com/adwords/answer/1704346> to upload the 
> enhanced conversion to Google Ads via Google Ads API. 
>
> For your question “*Where should I get the additional permission? In the 
> Google Ads account, Google Ads account(MCC), OAuth or what...?”*, you may 
> refer to the steps shown under "How to edit access level" section of *this 
> guide* 
> <https://support.google.com/adwords/answer/6372672?hl=en&ref_topic=3121776> 
> to edit the access level.
>
> In Google Ads API perspective, as an administrator, you can get the list 
> of users with access to an account by building a *Google Ads Query 
> Language* 
> <https://developers.google.com/google-ads/api/docs/query/overview> 
> statement to query all the *CustomerUserAccess* 
> <https://developers.google.com/google-ads/api/reference/rpc/v12/CustomerUserAccess>
>  
> entities associated with a customer ID. Here is a typical query:
>  
>
> SELECT
>
>   customer_user_access.user_id,
>
>   customer_user_access.email_address,
>
>   customer_user_access.access_role,
>
>   customer_user_access.access_creation_date_time,
>
>   customer_user_access.inviter_user_email_address
>
> FROM customer_user_access
>
> For more information, you may refer to this *page* 
> <https://developers.google.com/google-ads/api/docs/account-management/managing-users>.
>  
> In addition, you may refer to the sample JSON required to pass in your REST 
> API request:
>
>  
>
> {
>
>   "conversionAdjustments": [
>
>
>
> {
>
>   "gclidDateTimePair": {
>
> object (*GclidDateTimePair* 
> <https://developers.google.com/google-ads/api/rest/reference/rest/v12/customers/uploadConversionAdjustments#GclidDateTimePair>
> )
>
>   },
>
>   "adjustmentType": enum (*ConversionAdjustmentType* 
> <https://developers.google.com/google-ads/api/rest/reference/rest/v12/customers/uploadConversionAdjustments#ConversionAdjustmentType>
> ),
>
>   "restatementValue": {
>
> object (*RestatementValue* 
> <https://developers.google.com/google-ads/api/rest/reference/rest/v12/customers/uploadConversionAdjustments#RestatementValue>
> )
>
>   },
>
>   "userIdentifiers": [
>
> {
>
>   object (*UserIdentifier* 
> <https://developers.google.com/google-ads/api/rest/reference/rest/v12/UserIdentifier>
> )
>
> }
>
>   ],
>
>   "orderId": string,
>
>   "conversionAction": string,
>
>   "adjustmentDateTime": string,
>
>   "userAgent": string
>
> }
>
>  
>
>   ],  "partialFailure": boolean,  "validateOnly": boolean}
>
>  
>
> For more information, you may check this guide 
> <https://developers.google.com/google-ads/api/rest/reference/rest/v12/customers/uploadConversionAdjustments#ConversionAdjustment>
> .
>
> Regards,
> [image: Google Logo] 
> Yasar 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2hNq3J:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/14bb228c-7951-4b2b-baf6-a01b5e29d113n%40googlegroups.com.


RE: Why uploadConversionAdjustments API raises ACTION_NOT_PERMITTED error

2022-12-27 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Ryo,

Thanks for reaching out to the Google Ads API Forum.

The AuthorizationError.ACTION_NOT_PERMITTED error occurs when the user does not 
have permission to perform this action (e.g., ADD, UPDATE, REMOVE) on the 
resource or call a method. You encountered said error because you are using the 
credentials with adequate access level. You may need to have at least standard 
access level to upload the enhanced conversion to Google Ads via Google Ads API.

For your question “Where should I get the additional permission? In the Google 
Ads account, Google Ads account(MCC), OAuth or what...?”, you may refer to the 
steps shown under "How to edit access level" section of this guide to edit the 
access level.

In Google Ads API perspective, as an administrator, you can get the list of 
users with access to an account by building a Google Ads Query Language 
statement to query all the CustomerUserAccess entities associated with a 
customer ID. Here is a typical query:

SELECT

  customer_user_access.user_id,

  customer_user_access.email_address,

  customer_user_access.access_role,

  customer_user_access.access_creation_date_time,

  customer_user_access.inviter_user_email_address

FROM customer_user_access

For more information, you may refer to this page. In addition, you may refer to 
the sample JSON required to pass in your REST API request:


{

"conversionAdjustments": [


{

"gclidDateTimePair": {

object (GclidDateTimePair)

},

"adjustmentType": enum (ConversionAdjustmentType),

"restatementValue": {

object (RestatementValue)

},

"userIdentifiers": [

{

object (UserIdentifier)

}

],

"orderId": string,

"conversionAction": string,

"adjustmentDateTime": string,

"userAgent": string

}


],  "partialFailure": boolean,  "validateOnly": boolean}


For more information, you may check this guide.

Regards,

Yasar
Google Ads API Team
ref:_00D1U1174p._5004Q2hNq3J:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/dKrwm0RNJOMH00oxiZ-Nm_TNat7DSG-nd0rg%40sfdc.net.


Why uploadConversionAdjustments API raises ACTION_NOT_PERMITTED error

2022-12-26 Thread Ryo
Thank you for reading my question.

I have a question about cause of the ACTION_NOT_PERMITTED error.

I requested basic access of the Google Ads API and I was approved.
Moreover, I can request customers:listAccessibleCustomers API.

What's the cause of the error?
Where should I get the additional permission? In the Google Ads account, 
Google Ads account(MCC), OAuth or what...?

# request(Node.js)
## request access_token
await fetch('https://www.googleapis.com/oauth2/v3/token', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
  grant_type: 'refresh_token',
  client_id: clientId,
  client_secret: clientSecret,
  refresh_token: refreshToken,
}),
  });

## call the API
await 
fetch('https://googleads.googleapis.com/v12/customers/${customerId}:uploadConversionAdjustments',
 
{
method: 'POST',
headers: {
  'Content-Type': 'application/json',
  'Authorization': `Bearer ${accessToken}`,
  'developer-token': developerToken // from the API center of the MCC 
account
},
body: JSON.stringify({
  conversionAdjustments: [
{
  adjustment_type: 'ENHANCEMENT',
  userIdentifiers: [
{
  addressInfo: {
hashed_first_name: convertToSHA256(firstName),
hashed_last_name: convertToSHA256(lastName),
postal_code: convertToSHA256(postalCode),
state: convertToSHA256(prefecture),
city: convertToSHA256(city),
hashed_street_address: convertToSHA256(streetAddress),
  }
}
  ],
  orderId,
  conversionAction,
}
  ],
  partialFailure: true,
  validateOnly: true
}),
  });


# response
"error":{"code":403,"message":"The caller does not have 
permission","status":"PERMISSION_DENIED","details":[{"@type":"type.googleapis.com/google.ads.googleads.v12.errors.GoogleAdsFailure","errors":[{"errorCode":{"authorizationError":"ACTION_NOT_PERMITTED"},"message":"The
 
user does not have permission to perform this action on the resource or 
call a method."}],"requestId":""}]}}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/bcb8c16a-efe8-446a-ad52-5ff36314f4e0n%40googlegroups.com.


ACTION_NOT_PERMITTED Error while uploading click conversion

2022-05-23 Thread Rten Marketo
HI Team ,

We are observing an Action_NOT_Permitted error for one of our customers
while uploading click conversion.
Could you please let us know how to rectify the error below?

.exception.ServiceExceptionHandler - errors { error_code { authorization_
error: ACTION_NOT_PERMITTED } message: "The user does not have permission to
perform this action on the resource or call a method." } request_id: "
MiuW9BdTTUrmlyxBynYSrA" com.google.ads.googleads.v9.errors.
GoogleAdsException: errors { error_code { authorization_error: ACTION_NOT_
PERMITTED } message: "The user does not have permission to perform this
action on the resource or call a method." } request_id: "
MiuW9BdTTUrmlyxBynYSrA" at com.google.ads.googleads.v9.errors.
GoogleAdsException$Factory.createException(GoogleAdsException.java:42)
Suppressed: com.google.api.gax.rpc.AsyncTaskException: Asynchronous task
failed at com.google.api.gax.rpc.ApiExceptions.callAndTranslateApiException(
ApiExceptions.java:57)

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CAAguJvCMhXU2gvPwqTG1v_0T4DXw2-Jbh-wMxT%2BXsoYzw5ROig%40mail.gmail.com.


RE: ACTION_NOT_PERMITTED error

2022-05-06 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Serg,

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

Could you provide us with the complete request and response logs with the 
request-id, so our teacan better check?If you haven't yet, logging can be 
enabled by navigating to the Client libraries > Your client library (ex. Java) 
> Logging documentation, which you can access from this link. You may then send 
the requested information 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.

Thanks,

Nirmita
Google Ads API Team
ref:_00D1U1174p._5004Q2aR8HR:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/YpzQr0RBGW1B00qcfb4z8dQ2y2L666pQeQug%40sfdc.net.


ACTION_NOT_PERMITTED error

2022-05-06 Thread Serg Korsik
Hi! 

Currently we have the next error: 

errorMessage: {
  "error": {
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED",
"details": [
  {
"@type": 
"type.googleapis.com/google.ads.googleads.v10.errors.GoogleAdsFailure",
"errors": [
  {
"errorCode": {
  "authorizationError": "ACTION_NOT_PERMITTED"
},
"message": "The user does not have permission to perform 
this action on the resource or call a method."
  }
],
"requestId": "fKw5WYbyZbgsbugMTqaKWw"
  }
]
  }
}

Which permission is should be provided for that? Can you please send a link 
with the related settings? 

Thanks in advance for any help! 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/8abb5c27-eded-48fd-afab-e85a2c4feda7n%40googlegroups.com.