I followed this basic tutorial, but I get:
Eroare:redirect_uri_mismatch The redirect URI in the request: urn:ietf:wg:oauth:2.0:oob did not match a registered redirect URI
In my googlings I understand there is something wrong in some settings I made in API Console. I enabled Drive API and I made some settings in table API Access. I take the Client ID and client secret and I put these 2 values in client source but I do not know what to put in the Redirect URI.
What should contain the Redirect URIs?
This error typically means the Client Redirect URL was not properly added to the OAuth Web Application in the Google Cloud Console. To resolve this, the user will need to copy the Client Redirect URL from the Single Sign-On Settings page from ThinkCentral, my.hrw.com, or HMH Ed.
A redirect URI, or reply URL, is the location where the authorization server sends the user once the app has been successfully authorized and granted an authorization code or access token.
The URI urn:ietf:wg:oauth:2.0:oob
is a special URI used to identify out-of-browser applications, i.e. non-web applications (desktop, mobile, command line, etc.).
When you create the credentials in the APIs Console, make sure you select "Installed Application" as the application type and the redirect URI will automatically be set as urn:ietf:wg:oauth:2.0:oob
and prevent the "redirect_uri_mismatch" when making a request.
The URI
urn:ietf:wg:oauth:2.0:oob
is only applicable to those Google client IDs that have been generated for "installed applications".
So to solve your problem you have to create a new Client ID and set Application Type as "Installed application". There you can get ClientId and ClientSecret which you will need.
Create a new Project Here
Select APIs from the left side bar and make sure Drive SDK is ON
Go to Credientials below APIs ,tap on "CREATE NEW CLIENT ID"
Select Installed application and type as iOS and provide Bundle ID (or simply choose "Other")
Copy Client ID & Client secret to use that in your application.
The redirect URI is automatically generated and should prevent the error you are getting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With