400错误:yotube视频上传的redirect_uri_mismatch [英] 400 Error: redirect_uri_mismatch for yotube video upload
问题描述
I am implementing functionality for uploading video's to a YouTube channel from here.
我完全按照建议的方式设置了Google Developer控制台环境.
I set up my Google Developer console environment exactly like suggested.
我还使用了它给我的相同客户ID和客户机密.当我运行脚本时,它会返回错误.
I also use the same client Id and client secret that it gave me. When I run the script it returns with an error.
- 那是一个错误.错误:redirect_uri_mismatch应用程序:Localhost您可以通过XXXXX@gmail.com向该应用程序的开发人员发送电子邮件. 请求中的重定向URI: http://localhost/youtube/index.php 与注册的重定向URI.
- That’s an error. Error: redirect_uri_mismatch Application: Localhost You can email the developer of this application at: XXXXX@gmail.com The redirect URI in the request: http://localhost/youtube/index.php did not match a registered redirect URI.
请求详细信息
scope=https://www.googleapis.com/auth/youtube
response_type=code
access_type=online
redirect_uri=http://localhost/youtube/index.php
pageId=none
approval_prompt=auto
state=2067416475
client_id=xxxxxx68kc7csrag9as2o3lv70k0spa6hfb1ofs4.apps.googleusercontent
我不明白问题所在.
推荐答案
Google开发者控制台状态中的重定向URI
Redirect URI in the Google developers console states
每行一个URI.需要一个协议,没有URL片段,也没有 相对路径.不能是公共IP地址.
One URI per line. Needs to have a protocol, no URL fragments, and no relative paths. Can't be a public IP Address.
您已将其设置为
http://localhost/youtube
您应该将其设置为
http://localhost/youtube/index.php
重定向URI必须设置为要处理身份验证的确切文件的路径.
Redirect URI must be set to the path to the exact file which will handle the authentication.
注意: 另外,您现在将要删除该密码,因为您需要将您的客户端ID和客户端秘密保密,而您刚刚与所有人共享了该密码.
Note: Also you will now want to delete that one because you need to keep your client id and client secret private you just shared it with everyone.
这篇关于400错误:yotube视频上传的redirect_uri_mismatch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!