发布于 2021-06-16 16:29:46
1.我应该在Google控制台上授予这个服务帐户什么样的权限/角色?
有多个角色可能导致服务帐户出现在Play的API Access页面上,但是Play的开发人员支持建议使用Owner或Editor角色(没有我可以引用的资源,因为这是我通过直接接近支持得到的答案)。
很少有说明/意见:
API Access页面中。Viewer角色允许获取.*API。然而,Play的支持团队表示:“在调用Google API时,使用Viewer角色可能会产生401个响应代码”。Service account user角色的建议。但是,此角色允许模拟同一项目中的任何其他服务帐户,以使用其授予的角色和权限(来自文档)执行任何任务。不确定它是如何为其他人工作的--可能是因为有一个带有Editor角色默认情况下创建的的服务帐户(并且允许Service account user模拟它)。2.我应该在Google控制台上授予这个服务帐户什么权限/角色?
此支持页注意到,这些权限之一可以授予对购买API的访问:
View financial data -此权限仅适用于具有“App”访问权限的用户。View financial data, orders, and cancellation data survey responses -此权限仅适用于具有“帐户”访问权限的用户。最后要记住的是,访问传播可能需要24小时--因此,如果您在创建服务帐户之后尝试调用API,则很可能会得到以下错误:
{
"code" : 401,
"errors" : [ {
"domain" : "androidpublisher",
"message" : "The current user has insufficient permissions to perform the requested operation.",
"reason" : "permissionDenied"
} ],
"message" : "The current user has insufficient permissions to perform the requested operation."
}https://stackoverflow.com/questions/57666690
复制相似问题