我一直在寻找这个答案,但其他页面对我没有帮助。
我正在尝试使用php的google drive api。我正尝试在我的本地环境中进行测试,并收到此错误。
Error: redirect_uri_mismatch
The redirect URI in the request: urn:ietf:wg:oauth:2.0:oob did not match a registered redirect URI
Request Details
scope=https://www.googleapis.com/auth/drive
response_type=code
redirect_uri=urn:ietf:wg:oauth:2.0:oob
access_type=offline
display=page
prompt=consent
client_id=735129338633-0epug8n80jsg0t50ijn7our4a661nnk6.apps.googleusercontent.com以下是api的页面:
url位于localhost:8888/Spreadsheets/driver.php中

我做错了什么?
发布于 2014-08-28 01:53:18
看起来当前的Google OAuth2集成需要启用
Contacts API
Google+ API从相关联的项目的Google开发人员控制台。在我的日志中,我注意到像403, Access Not Configured. Please use ....一样的错误
发布于 2014-08-08 17:59:13
重定向URI (响应返回到的位置)必须是正确的,并且与您在API控制台中注册的完全相同,并且该错误指示您没有执行该操作或未正确执行。
要从控制台获取重定向URI:
发布于 2014-08-24 02:56:01
即使您在控制台中正确设置了重定向uri,很多时候,当您最近在google dev控制台中更改设置时,它仍然会告诉您存在重定向不匹配。令人惊讶的是,这种情况很常见。
你可以试试..。
https://stackoverflow.com/questions/17354581
复制相似问题