0

I can get my list of youtube videos using google .NET client libraries following the example in the following link

https://developers.google.com/youtube/v3/code_samples/dotnet

This works fine when I am using it in a console application and my project's Client Id is of type 'Installed Application'.

I want to make it work for my web application. I created a client id of type 'Web Application' and provided appropriate redirect_uri. When I run the application, it always generates a random redirect_uri in the request and I am getting redirect_uri mismatch error. How can I fix this problem? What am I missing?

1 Answers1

0

Did you follow the instructions on https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#web_applications? It contains code snippets and explanations about the 'redirect URI' you need to register in Google Developers Console (The URI should look like: your_site/AuthCallback/IndexAsync).

If you choose to create a ASP.NET (NOT MVC) application, you can take a look in the following sample: https://code.google.com/p/google-api-dotnet-client/source/browse?repo=samples#hg%2FTasks.ASP.NET.SimpleOAuth2.

peleyal
  • 3,472
  • 1
  • 14
  • 25