不断收到错误:使用YouTube API V3 redirect_uri_mismatch [英] Keep getting Error: redirect_uri_mismatch using youtube api v3

查看:430
本文介绍了不断收到错误:使用YouTube API V3 redirect_uri_mismatch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我希望有人能帮助我在这里。

Hi I hope someone can help me out here.

我有我的本地计算机上的Web应用程序(asp.net),我试图上传视频YouTube上使用此示例 https://developers.google.com/youtube/v3/ code_samples / DOTNET#upload_a_video

I have a Web Application (asp.net) on my local machine, I am trying to upload video to YouTube using this sample https://developers.google.com/youtube/v3/code_samples/dotnet#upload_a_video

我已经设置了客户端ID,并在谷歌控制台Web应用程序的秘密,当我尝试将视频上传浏览器选项卡中打开选择我的谷歌帐户,并将有一次我在SIG的,我得到redirect_uri_mismatch页面上的响应细节如下:

I have set up client id and secret for Web application in Google console when I try to upload video a browser tab opens to select one of my google accounts and once I sig in I get redirect_uri_mismatch the response details on that page are below:

cookie_policy_enforce=false
scope=https://www.googleapis.com/auth/youtube.upload
response_type=code
access_type=offline
redirect_uri=http://localhost:55556/authorize/
pageId=[some page id removed here for security reasons]
display=page
client_id=[some unique id removed here for security reasons].apps.googleusercontent.com

一个有趣的事情是, REDIRECT_URI =的http://本地主机:55556 /授权/ 是我每次得到的错误页面的端口号改变一个在谷歌控制台设置和一个在client_secrets.json中也完全不同。

one interesting thing is that the redirect_uri=http://localhost:55556/authorize/ is completely different from the one set up in Google console and the one in client_secrets.json also each time I get the error page the port number changes.

redurect URL和起源被设置为在谷歌控制台下面我想我刚才的情况下添加所有组合:

redurect urls and origins are set as follows in Google console I think I have added all combinations just in case:

授权的重定向URI

http://localhost/
https://localhost/
http://localhost:50169/AddContent.aspx
https://localhost:50169/AddContent.aspx
http://localhost:50169

授权JavaScript源

http://localhost/
https://localhost/
http://localhost:50169/
https://localhost:50169/

我不知道为什么重定向-URI错误页面不匹配任何授权的重定向URI我曾在谷歌控制台中指定的
对?任何想法?

I am not sure why redirect-uri on the error page does not match any of the Authorized redirect URI I have specified in Google console ? any ideas ?

另外是有可能,一切都在谷歌控制台设置是否正确,我的代码,但这个错误是由什么引起别的喜欢,也许我错过了一些设置上我管你的帐户?我没有更改任何设置,因为我不认为我必须是正确的?

Also is it possible that everything is set-up correctly in Google console and my code but this error is triggered by something else like maybe I missed some setting on my you tube account ? I did not make any setting changes since I don't think I have to is that correct ?

推荐答案

好吧我相信根据那些直接的视频上传到网站的所有者帐户YT API 3.0不再支持帖子。

Ok I belive that direct video upload to the website owner account is no longer supported in YT API v3.0 according to those posts.

YouTube能直接上传到为所有用户一个共同帐户

How可以在YouTube网络摄像头使用小工具API上传到一个帐户?

羞耻,我想我会需要主机用户在我的服务器上传的视频。

Shame, I think I will need to host the videos that users upload on my servers.

然而,原来的问题是固定在开发者控制台

的http://本地主机/授权/

< A HREF =htt​​p://stackoverflow.com/questions/11485271/google-oauth-2-authorization-error-redirect-uri-mismatch/28927258#28927258>谷歌的OAuth 2授权 - 错误:redirect_uri_mismatch

这篇关于不断收到错误:使用YouTube API V3 redirect_uri_mismatch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆