Keep getting Error: redirect_uri_mismatch using youtube api v3

前端 未结 5 1205
孤街浪徒
孤街浪徒 2020-12-19 04:35

Hi I hope someone can help me out here.

I have a Web Application (asp.net) on my local machine, I am trying to upload video to YouTube using this sample https://deve

5条回答
  •  臣服心动
    2020-12-19 04:41

    You should look into your code where you create the authorization URI. You need pass one of the redirect URIs you registered with Google developer console. I guess you're using some OAuth2 library which uses the localhost:port/authorize as the default redirect URI. The port changes because each time you start your local server, it picks a different port number. To fix it, you should specify a port number when starting it, for example, 8080. Then you should register localhost:8080/AddContent.aspx in Google developer console and pass it to whichever library you use to create the authorization URI.

提交回复
热议问题