0

我们无法使用服务帐户进行转销商 API 调用。链接上的步骤:

https://developers.google.com/drive/delegation#delegate_domain-wide_authority_to_your_service_account

没有任何运气。

带着敬意

4

2 回答 2

0

是的,这现在有效。以防万一您使用 PHP 库(来自 google) - 它应该是这样的:

$cred = new Google_Auth_AssertionCredentials(
  'e-mail from the API user',
  ['https://www.googleapis.com/auth/apps.order'],
  'Content from your P12 key file',
  'notasecret',
  'http://oauth.net/grant_type/jwt/1.0/bearer',
  'the-email@of-the-real-account.com'
);
于 2014-12-05T16:50:19.693 回答
0

对目录或经销商 API 执行服务帐户身份验证时,您必须在实例中模拟具有适当权限以进行 API 调用的 Google Apps 用户。这是通过服务帐户文档中描述的 prn 参数完成的。指定 prn 用户的方式因客户端库而异。

于 2013-11-11T19:11:51.077 回答