简体   繁体   English

当前用户权限不足,无法执行请求的操作 - Google Play Developer API

[英]The current user has insufficient permissions to perform the requested operation - Google Play Developer API

I have a Google Dev Console process with Google Play Developer API is enabled and the project is linked to Google Play project.我有一个谷歌开发控制台进程,谷歌播放开发者 API 已启用,并且项目链接到谷歌播放项目。 In Google Dev console project, created a service account (I'm an owner of the project).在 Google Dev 控制台项目中,创建了一个服务帐户(我是该项目的所有者)。 After that i create a json file key to authenticate.之后,我创建了一个 json 文件密钥进行身份验证。 Tried to using google-api-client in PHP, Google Developer API Playground to send request to In-App-Purchase details of my apps but got error: "The current user has insufficient permissions to perform the requested operation."尝试在 PHP、Google Developer API Playground 中使用 google-api-client 向我的应用程序的应用内购买详细信息发送请求,但出现错误:“当前用户没有足够的权限来执行请求的操作。” Details as below:详情如下:

Request:要求:

GET Request https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}?access_token={access_token}

Response回复

Array
(
    [error] => Array
        (
            [code] => 401
            [message] => The current user has insufficient permissions to perform the requested operation.
            [errors] => Array
                (
                    [0] => Array
                        (
                            [message] => The current user has insufficient permissions to perform the requested operation.
                            [domain] => androidpublisher
                            [reason] => permissionDenied
                        )

                )

        )

)

The Method: purchases.products.get operates on private user data. 方法: purchasing.products.get 对私人用户数据进行操作。 Due to that fact you used Oauth2 to authorize a user and get an access token.由于这个事实,您使用 Oauth2 来授权用户并获取访问令牌。

this method requires that the user to consent to the following scope此方法需要用户同意以下 scope

在此处输入图像描述

The error message The current user has insufficient permissions to perform the requested operation.错误信息The current user has insufficient permissions to perform the requested operation.

Means one of two things.表示两件事之一。

  • you authorized the user but not with the above scope, if you changed the scope remember the user must consent to this scope so you need to be sure that it popped up the consent screen for the user again.您授权用户但未使用上述 scope,如果您更改了 scope,请记住用户必须同意此 scope,因此您需要确保再次弹出用户同意屏幕。
  • The user who you have authorized themselves does not have access to this information in which case you need to authorize a user with access.您授权自己的用户无权访问此信息,在这种情况下,您需要授权用户访问。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PayPal Payflow API提供错误权限不足,无法执行交易 - PayPal Payflow api gives error Insufficient permissions to perform transaction 带有PHP的Google Play开发者API - Google Play Developer API with PHP Binance API - 账户余额不足,无法执行请求的操作 - Binance API - Account has insufficient balance for requested action 尝试将文件移动到文件夹时,Google API权限不足 - Google API Insufficient Permissions when attempting to move file to folder Google Analytics(分析)API开始发出错误403权限不足(PHP) - Google Analytics API began to issue an error 403 insufficient Permissions (PHP) 调用DELETE时出错-(403)该文件权限不足” | Google Drive API - Error calling DELETE - (403) Insufficient permissions for this file" | Google Drive API Google云端存储-权限不足 - Google Cloud Storage - Insufficient Permissions 在Google API v2中,为什么会出现错误“用于调用Google Play Developer API的项目ID尚未链接”? - In Google API v2, why is the error “The project id used to call the Google Play Developer API has not been linked” happening? 即使所有者ID与用户ID相同,move_uploaded_file()也没有足够的权限 - move_uploaded_file() has insufficient permissions even though the owner id is the same as the user id 如何在php中读取/解密用户定义的数学公式并执行请求的操作 - how to read/decipher a user defined mathematical formula and perform requested operation in php
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM