David
David

Reputation: 1026

How to set redirect_uri in google developer console?

I got the Client Id and API Key by registering my project with developer console. And While running authentication process i get an error like this 400. That’s an error. Error: redirect_uri_mismatch The redirect URI in the request: http://localhost:8080/ did not match a registered redirect URI.

I have not registered any redirect uri. Can anyone fix this or tell me how to set the redirect uri.I could not find any redirect url while registering.enter image description here

Upvotes: 2

Views: 8543

Answers (1)

jlmcdonald
jlmcdonald

Reputation: 13667

The redirect URI is an object only used by web applications that are doing oAuth2 authentication; so, when you create a new client ID, choose "web application" as the ID type and there will be a text area where you enter all of the allowed redirect URIs (these web pages will be coded by you, and will need to perform the function of doing the oauth2 ticket verification).

If your app is not a web application, you choose "installed application" as the type and you'll get a key that can be used in an Android/iOS/desktop app. However, this key will NOT be useable, at all, in a web application.

If your web application doesn't need to write any data or upload any files, you can create a public API key that you just include as a parameter with your requests.

Service accounts (which you're showing in the image above) are not compatible with the YouTube API.

Upvotes: 6

Related Questions