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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/bcb8c16a-efe8-446a-ad52-5ff36314f4e0n%40googlegroups.com.
  • Wh... Ryo
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to