Getting "DEVELOPER_TOKEN_NOT_APPROVED" after moving code to a different server

1,480 views
Skip to first unread message

Stiofán Ó Riain

unread,
Feb 8, 2022, 6:16:23 AM2/8/22
to Google Ads API and AdWords API Forum
Hi all

I am using the same code, same developer token, same everything.

If I run the code on localhost it works fine. If I run it on domain.com I get the following error:

Fatal error: Uncaught Google\ApiCore\ApiException: { "message": "The caller does not have permission", "code": 7, "status": "PERMISSION_DENIED", "details": [ { "@type": "type.googleapis.com\/google.ads.googleads.v8.errors.GoogleAdsFailure", "errors": [ { "errorCode": { "authorizationError": "DEVELOPER_TOKEN_NOT_APPROVED" }, "message": "The developer token is not approved. Non-approved developer tokens can only be used with test accounts." } ], "requestId": "Kz-OPMgsJ5oRs5gb18pQrg" } ] } thrown in /var/www/html/vendor/google-ads-php/vendor/google/gax/src/ApiException.php on line 168

I have added domain.com to the Authorized JavaScript origins, added domain.com to the Authorized redirect URIs, and added domain.com to Authorized domains.

I am using the same test accounts to test things.

Can you help?

Thanks!


Google Ads API Forum Advisor

unread,
Feb 8, 2022, 2:15:12 PM2/8/22
to off...@countyjobs.ie, adwor...@googlegroups.com
Hello,

Thanks for reaching out. The presented issue is caused by making a call against a production account with a developer token only approved for Test Access. You can apply for Basic Access by following the steps outlined here.

If the request is working on a separate server, then the target account is a test account.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5J2j:ref

Giang Nguyễn Trường

unread,
May 15, 2022, 9:21:16 PM5/15/22
to Google Ads API and AdWords API Forum
Hi all
I use developer token on localhost environment with error code "DEVELOPER_TOKEN_NOT_APPROVED" .
Don't know how you fixed this error on localhost?
Can you help?
Thanks!
Vào lúc 18:16:23 UTC+7 ngày Thứ Ba, 8 tháng 2, 2022, Stiofán Ó Riain đã viết:

Google Ads API Forum Advisor

unread,
May 15, 2022, 11:41:47 PM5/15/22
to giang...@gmail.com, adwor...@googlegroups.com

Hi Giang,
 

Thanks for reaching out to the Google Ads API Support team.
 

With regard to your concern, It seems you have encountered a problem "DEVELOPER_TOKEN_NOT_APPROVED". This error said, The developer token is not approved. Non-approved developer tokens can only be used with test accounts. With this, you may refer to this guide to fix your problem in "Developer Token ".  I hope this helps with your concern.
 

Let us know if you have further questions.


Regards,

Google Logo
Darwin
Google Ads API Team
 


ref:_00D1U1174p._5004Q2at68I:ref
Reply all
Reply to author
Forward
Message has been deleted
0 new messages