【问题标题】:Gmail API not a valid originGmail API 不是有效来源
【发布时间】:2017-11-23 17:27:57
【问题描述】:

我使用的是 Gmail API Javascript,但这是个问题。

Uncaught {error: "idpiframe_initialization_failed", details: "Not a valid origin for the client: http://localhos…itelist this origin for your project's client ID."} details : "Not a valid origin for the client: http://localhost has not been whitelisted for client ID 731803464357-pdq2kfb0qg5ahca5gvvht343u2qmbgdk.apps.googleusercontent.com . Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID." error: "idpiframe_initialization_failed"

这是我的配置文件:http://localhost/b.html

【问题讨论】:

    标签: api gmail


    【解决方案1】:

    在进行 HTTP 请求之前,您是否添加了 Origin HTTP 标头?

    const headers = new HttpHeaders().set('Origin', 'http://localhost')

    【讨论】:

      猜你喜欢
      • 2018-04-02
      • 2019-01-26
      • 2017-10-19
      • 2021-04-10
      • 1970-01-01
      • 2015-03-20
      • 2023-01-31
      • 2018-11-17
      • 2019-11-09
      相关资源
      最近更新 更多