检查应用内购买我使用了这个 api https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}并得到了这个回应。
{
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"errors": [
{
"message": "Insufficient Permission",
"domain": "global",
"reason": "insufficientPermissions"
}
],
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
"domain": "googleapis.com",
"metadata": {
"method": "androidpublisher.ProductPurchasesService.Get",
"service": "androidpublisher.googleapis.com"
}
}
]
}
}
最佳答案
您有没有从 GCE VM 调用它?如果是这样,您可能想要:
停止虚拟机
转到云控制台中的 GCE VM 实例
在机器上点击编辑
根据需要编辑范围(最好只将范围添加到特定的 API,或者如果您认为合适 - 添加到所有 API,具体取决于上下文和风险)
重启机器,再次调用API
关于node.js - ACCESS_TOKEN_SCOPE_INSUFFICIENT 403 请求的认证范围域不足,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70099753/