使用Google Play API Explorer发起退款时遭遇projectNotLinked错误求助
解决Google Play Developer API调用orders.refund接口的403 projectNotLinked错误
问题背景
尝试通过Google Play Developer API Explorer调用orders.refund接口,为已购买的IAP退款并撤销授权,按流程完成API启用、API Explorer参数配置后,登录执行请求时触发403错误,错误详情如下:
{ "error": { "code": 403, "message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.", "errors": [ { "message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.", "domain": "androidpublisher", "reason": "projectNotLinked" } ] } }
解决步骤
- 回到Google Play开发者控制台的「API访问」页面,找到你创建的Google Cloud项目对应的条目
- 确认项目状态:如果显示「未关联」,点击「关联」按钮完成Play控制台与Cloud项目的双向绑定——仅仅在Cloud项目中启用API是无效的,必须在Play控制台完成关联操作
- 关联完成后,等待5-10分钟让权限同步(Google权限系统存在延迟),再重新在API Explorer中执行
orders.refund请求 - 检查登录API Explorer的账号,确保其拥有该Play控制台项目的所有者或开发者权限,避免因账号权限不足导致的报错
内容的提问来源于stack exchange,提问作者Noam Behar
相关产品推荐
相关产品推荐

