Google drive : redirect_uri_mismatch

拟墨画扇 提交于 2019-11-29 03:07:34
Claudio Cherubino

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.

Jayaprada

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.

  1. Create a new Project Here

  2. Select APIs from the left side bar and make sure Drive SDK is ON

  3. Go to Credientials below APIs ,tap on "CREATE NEW CLIENT ID"

  4. Select Installed application and type as iOS and provide Bundle ID (or simply choose "Other")

  5. 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.

For those web applications,please define the URI as your php url as it can handle the token and operate google drive.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!