【问题标题】:How to Create OAuth Client ID?如何创建 OAuth 客户端 ID?
【发布时间】:2020-08-04 10:48:42
【问题描述】:

我正在尝试运行此github project。 为此,我需要创建凭据和 OAuth 客户端 ID。 当我点击创建。选择 Web 应用程序并输入名称后,我看到授权的 javascript 和授权的重定向 uri。

那么我应该在那里输入什么,因为我尝试将两个字段都保留为空。但我收到错误提示 no redirect url found for client id

请帮助我。 我第一次使用开发者控制台在互联网上找不到任何帮助。这个网站是我最后的希望。

我按照[评论]中所说的做了。2 这是我在 Linux shell 中得到的内容,以及我在重定向 url 打开网页时收到的错误。

Linux Shell 消息

/YouTube-Subscription-Importer/env/lib/python3.6/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access subscribe.py-oauth2.json: No such file or directory
warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?client_id=1069660256195-n8adm0dmi70v29i55hcfblftle09hb5n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube&access_type=offline&response_type=code
If your browser is on a different machine then exit and re-run this
application with the command-line parameter
--noauth_local_webserver

Snipe of what redirect url webpage said

**最重要的

我在 windows bash 中运行它。

现在告诉我下一步该做什么。

我只需要一份关于 Google 开发者控制台凭据和 OAuth 屏幕的教程/使用指南。

**

【问题讨论】:

  • 你已经注册账号了吗?
  • @AvivLo 是的。为什么?
  • 只是询问您是否真的注册了凭据以供使用。
  • 是的,但请参阅编辑后的帖子。帮助我。

标签: google-api google-oauth youtube-data-api google-api-client google-developers-console


【解决方案1】:

需要重定向 URL,您将从 Google OAuth 同意屏幕重定向到 https://REDIRECT_URL?code=AuthorizationCode,您可以将其设置为 http://localhost

创建后,您可以在凭据页面上找到客户端 ID。

【讨论】:

  • 那么授权的javascript uri呢?
  • @Neycerys 你可以留空。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-11-04
  • 1970-01-01
  • 1970-01-01
  • 2017-10-18
  • 1970-01-01
  • 2023-01-01
  • 2020-12-04
相关资源
最近更新 更多