You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用PHP调用GoogleAds API遇DEVELOPER_TOKEN_NOT_APPROVED错误的解决方法

修复Google Ads API的DEVELOPER_TOKEN_NOT_APPROVED错误

错误原因

你的开发者令牌仅被授权用于测试账户,无法访问正式的Google Ads客户账户,因此调用正式客户ID的API时触发该错误。

解决方案

  • 升级开发者令牌权限
    登录Google Ads API管理后台,提交Basic或Standard级别的访问权限申请。申请时需提供API使用场景、业务需求说明等信息,待Google审核通过后,令牌即可用于访问正式客户账户的数据。

  • 临时测试方案(可选)
    如果需要先验证代码逻辑,可以使用Google Ads官方提供的测试账户:创建测试经理账户和测试客户账户,用测试账户的客户ID调用API,确认PHP代码的查询逻辑(获取广告系列名称、成本)是否正常运行。

错误响应详情

{
  "@type": "type.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure",
  "errors": [
    {
      "errorCode": {
        "authorizationError": "DEVELOPER_TOKEN_NOT_APPROVED"
      },
      "message": "The developer token is only approved for use with test accounts. To access non-test accounts, apply for Basic or Standard access."
    }
  ]
}

内容的提问来源于stack exchange,提问作者Md. Khurshed Alam Nayem

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 19:00:58