redirect_uri_mismatch error while creating a classroom through google classroom API -


i trying use google classroom api's integrate product. have created project in developer console , created oauth credentials.

downloaded client secret json file.

i trying create class in google classroom through api. code have used access follows:

 using (var stream = new filestream(system.web.httpcontext.current.server.mappath("client_secret.json"), filemode.open, fileaccess.read))         {                 string credpath = system.environment.getfolderpath(system.environment.specialfolder.personal);                 credpath = path.combine(@"c:\googlekeys\.credentials\classroom-dotnet-quickstart.json");                  credential = googlewebauthorizationbroker.authorizeasync(googleclientsecrets.load(stream).secrets, scopes, "user", cancellationtoken.none, new filedatastore(credpath, true)).result;          } 

when executing last step giving error error:

redirect_uri_mismatch 

i have cross checked between developer console , json file both have same redirect uris. have done process other domains , has worked great.

confusing thing me each , every time run code, redirect uri in url changing.

run 1: redirect uri in request, http://localhost:51282/authorize/, not match ones authorized oauth client

run 2: redirect uri in request, http://localhost:44699/authorize/, not match ones authorized oauth client

i confused picking redirect url.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

unity3d - Fatal error- Monodevelop-Unity failed to start -