2

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

1 Answer 1

6

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.

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks @jlmcdonald. Can you tell me what must i use for YouTube API. Web applications , Installed Applications or Any other.
Is your app running on the web, or on a device?
@jlmcdonald.On device. I have referred this github.com/sohnkh/YoutubeUploadAndroidSampleV3. But I am making some mistake. Can you please send any links for uploading a video to youtube. A samplecode will be a great help sir. I referred google developer site, but could not understand. All i want is to upload a video to youtube from my app. I tried with intents, but i am getting the Title and descriptions empty. Can you please help me with this sir.
So wait, if you need your app server to work for iOS and for web, is that not possible, or only with 2 different configs? Seems like you should be able to set it up for "installed apps" and web/redirect urls
What should I enter as redirect_uri when cancelling In App Billing subscription like here: developers.google.com/android-publisher/api-ref/purchases/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.