August 9, 2024
GoogleAds API: Developer token is not allowed with project xxx
August 9, 2024
If you are looking for a more straight forward way of retrieving all your ads data without having to deal with developer tokens and such, check out n2api.io. It's a unified API where one call can get your ad data from multiple platforms like Facebook, Google, TikTok... all from a single, easy to understand REST API.

When working with GoogleAds API for the first time, and especially when you want to setup a development and a production app, you may encounter the following API error message:

{
   "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 'xxxxxxxxx'."
                   }
               ],
               "requestId": "Kl748ALLigZZjqVCuANPZA"
           }
       ]
   }
}

This error likely is due to the undocumented fact that when you make the first API call with your GoogleAds Developer Token, Google connects the Token with your app client (the client you setup in the Google Cloud Console). As stated here:

Warning: 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 switching to a developer token under a new manager account, you'll need to create a new Google API Console project for Google Ads API requests that use the new manager's token. If you do not use a new Google API Console project, you'll get a DEVELOPER_TOKEN_PROHIBITED error when making a request.

So the developer token used here is

  • either already linked to a project
  • or the project you use is already linked to another developer token

So to solve this issue, you most likely will have to create

  • either a new developer token and make the first API call with it to your not yet connected project
  • or create a new project in Google Cloud Console and then make the first API call with your developer token to that project to link them together.

Cheers and good luck at building you GoogleAds integration

-Tim

If you are looking for a more straight forward way of retrieving all your ads data without having to deal with developer tokens and such, check out n2api.io. It's a unified API where one call can get your ad data from multiple platforms like Facebook, Google, TikTok... all from a single, easy to understand REST API.