我正在关注 Google 开发人员“快速入门:在 Python 中运行 Gmail 应用程序” https://developers.google.com/gmail/api/quickstart/quickstart-python
在步骤 3“运行示例”之前一切正常,其中的说明是“使用 python quickstart.py 运行示例”。
当我这样做时,预期的结果是我的浏览器将加载并启动授权。相反,我在 Google 上得到了错误 400 页面。
Error: redirect_uri_mismatch
The redirect URI in the request: http://localhost:8080/ did not match a registered redirect URI
问题是,“localhost ...”不在重定向 URI 中,我检查了许多其他类似的问题,通常答案表明确认 URL 完全相同。我已经做到了,https/http,额外的反斜杠,都是一样的。谷歌仍然说我正在发送 localhost:8080。