【问题标题】:Google Groups Migration API not permitting any API RequestsGoogle Groups Migration API 不允许任何 API 请求
【发布时间】:2014-10-01 15:57:32
【问题描述】:

我无法让 Google Groups Migration API 正常工作。我可以访问 API,但一旦获得访问权限,我将无法执行任何操作。

developer playground 的 Select & Authorize APIs 标题下,我将此自定义范围添加到输入字段中:

https://www.googleapis.com/auth/apps.groups.migration

这是Google's docutmention中列出的范围,所以我很确定它是正确的。

我同意开发者游乐场的 OAuth 访问,然后在第 2 步中,我可以用访问令牌交换令牌。

问题是在第 3 步,当我按下标有“列出可能的操作”的按钮时,它告诉我没有可用的操作。

总而言之,我能够获得 Google Groups Migration API 的访问令牌,但我无权执行任何操作。

知道我在这里做错了什么吗?

【问题讨论】:

    标签: google-api google-groups google-groups-api


    【解决方案1】:

    并非所有 API 都列出了可能的操作,因此您需要手动配置操作。根据 Groups Migration archive.insert() 参考,您需要:

    1. 将 HTTP 方法设置为“POST”
    2. 将内容类型更改为自定义,“message/rfc822”
    3. 将请求 URI 设置为“https://www.googleapis.com/upload/groups/v1/groups/GROUPEMAIL/archive?uploadType=media”(将 GROUPEMAIL 替换为组的实际地址)
    4. 输入如下示例邮件的正文请求(确保您拥有所有需要的标头,例如 from、to、subject、message-id 等)。

    Received: by 10.143.160.15 with HTTP; Mon, 16 Jul 2007 10:12:26 -0700 (PDT) Message-ID: Date: Mon, 16 Jul 2007 10:12:26 -0700 From: "samplesender@example.com" To: "samplegroup@googlegroups.com" Subject: SUBJECT MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Delivered-To: samplegroup@samplegroup.com

    这是已迁移电子邮件的正文。

    一旦您拥有所有这些元素,发送请求应该会成功,您应该会在群组存档中看到该消息。

    请注意,该 API 仅适用于 Google Groups for Business。您必须以 Google Apps 超级管理员用户身份进行身份验证,并发布到 Google Groups for Business 群组(不以 @googlegroups.com 结尾)。这些要求是spelled out in the documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-26
      • 1970-01-01
      • 1970-01-01
      • 2016-07-09
      • 2015-08-09
      • 2021-05-19
      • 2014-04-21
      • 1970-01-01
      相关资源
      最近更新 更多