DEVELOPER_TOKEN_PROHIBITED

445 views
Skip to first unread message

Maxime Heurtevent

unread,
Oct 24, 2023, 8:53:28 PM10/24/23
to Google Ads API and AdWords API Forum
Hi team, 

I have a manager account with a developer test token, and I've subsequently created test accounts in order to develop my functionalities in a test environment. However, even with all the right parameters, I get the error DEVELOPER_TOKEN_PROHIBITED.

Here's an example of the CURL request I use that results in this error:

curl -X POST \
     -H "Content-Type: application/json" \
     -H "developer-token: {DEVELOPER_TOKEN}" \
     -H "Authorization: Bearer {ACCESS_TOKEN}" \
     -d '{
           "query": "SELECT campaign.id, campaign.name FROM campaign"
         }' \
     https://googleads.googleapis.com/v15/customers/{CLIENT_TEST_ID}/googleAds:search
{
  "error": {
    "code": 403,
    "message": "The caller does not have permission",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.ads.googleads.v15.errors.GoogleAdsFailure",
        "errors": [
          {
            "errorCode": {
              "authorizationError": "DEVELOPER_TOKEN_PROHIBITED"
            },
            "message": "Developer token is not allowed with project '{CLIENT_TEST_ID}'."
          }
        ],
        "requestId": "taFQMxFBX6Rlbp37uSxMBQ"
      }
    ]
  }
}

How can I fix this issue? 
Thank you for your help

Google Ads API Forum Advisor

unread,
Oct 25, 2023, 5:19:33 AM10/25/23
to m.77.heurtev...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for contacting the Google Ads API support team.

By reviewing your query, I understand you are encountering the "DEVELOPER_TOKEN_PROHIBITED" error. Kindly note that each Google API Console project can be associated with the developer token from only one manager account. Once you make a Google Ads API request, the developer token is permanently paired to the Google API Console project. If you don't use a new Google API Console project, you'll get a DEVELOPER_TOKEN_PROHIBITED error when making a request.

To know more about the error and prevention tips kindly refer to this documentation on the DEVELOPER_TOKEN_PROHIBITED error. Let us know if you have any further queries/concerns related to the Google Ads API.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02pW0xh:ref"

Thanks,
 
Google Logo Google Ads API Team


Maxime Heurtevent

unread,
Oct 25, 2023, 8:58:01 PM10/25/23
to Google Ads API and AdWords API Forum
Ok thank you, by creating a new Google API Console Project I solved my error

Google Ads API Forum Advisor

unread,
Oct 25, 2023, 10:55:50 PM10/25/23
to m.77.heurtev...@gmail.com, adwor...@googlegroups.com
Hi,

It's great to hear that you have solved your error, feel free to get back to us.
Reply all
Reply to author
Forward
0 new messages