【问题标题】:ACCESS_TOKEN_SCOPE_INSUFFICIENT 403 Request had insufficient authentication scopes domain globalACCESS_TOKEN_SCOPE_INSUFFICIENT 403 请求没有足够的身份验证范围域全局
【发布时间】:2021-11-24 16:37:31
【问题描述】:

为了检查应用内购买,我使用了这个 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"
                }
            }
        ]
    }
}

【问题讨论】:

  • 请编辑您的问题并包含您的代码
  • 请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。

标签: node.js google-api google-oauth google-apis-explorer androidpublisher


【解决方案1】:

Method: purchases.products.get 对私人用户数据进行操作。

因为它需要特别授权,所以需要使用以下范围授权用户

错误消息“ACCESS_TOKEN_SCOPE_INSUFFICIENT”,表示当您授权用户时,您没有授权他们使用上述范围,因此您无权访问此方法。

确保您更改代码中的范围,然后强制您的应用重新授权用户。用户需要再次看到同意屏幕,否则您将使用旧授权运行。

【讨论】:

  • 嗨。我在使用 Google People API 的 Java 桌面应用程序中遇到了类似的问题。我更改了代码中的范围,然后出现了该错误。如何强制我的应用重新授权用户,以便我可以再次看到同意屏幕?
  • 这加深了您的代码 java 客户端库正常附加了一个数据存储。用你的代码打开一个问题,我会看看。
  • @DalmTo 我开了一个新问题:link。我得到了一个没有帮助的答案。我会很感激你的意见。谢谢。
猜你喜欢
  • 2021-01-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-04-28
  • 2023-03-13
  • 2017-08-09
  • 2016-11-11
  • 1970-01-01
相关资源
最近更新 更多