【问题标题】:Gmail API- Metadata scope does not support 'q' parameterGmail API - 元数据范围不支持“q”参数
【发布时间】:2018-07-19 18:22:45
【问题描述】:

我正在尝试将 Gmail API 用于我的网络应用程序。我想要的是获取带有附件文件的消息,并且我正在关注this tutoral

问题是当我使用'q'参数时,它返回错误:Metadata scope does not support 'q' parameter

My request URL

注意:我的授权范围是:

【问题讨论】:

    标签: api google-api metadata gmail-api google-apis-explorer


    【解决方案1】:

    https://www.googleapis.com/auth/gmail.metadata 包含在范围内时会出现错误消息。但是在您的范围内,它没有被使用。所以请再次确认以下几点。

    • 如果在您的脚本中检索到刷新令牌,请将其删除并使用不带https://www.googleapis.com/auth/gmail.metadata 的范围再次授权。
    • 如果您使用 Google APIs Explorer,请在 https://myaccount.google.com/permissions 删除 Google APIs Explorer。
      • 请登录并删除它。

    完成上述操作后,请通过授权使用没有https://www.googleapis.com/auth/gmail.metadata的范围来使用端点的API。

    如果这对你没有用,我很抱歉。

    【讨论】:

    • 感谢您的回答,已经成功。原因是我在旧范围内允许了 gmail.metadata,在我在 Google APIs Explorer 中将其删除后,授权将再次请求权限。
    • @Phat Le 很高兴您的问题得到了解决。我也遇到过同样的情况。
    猜你喜欢
    • 2015-05-18
    • 2016-09-29
    • 2018-05-04
    • 2019-01-23
    • 2018-04-19
    • 1970-01-01
    • 2012-10-30
    • 1970-01-01
    • 2020-06-05
    相关资源
    最近更新 更多