【问题标题】:Google Drive SDK Sample PHP ExceptionGoogle Drive SDK 示例 PHP 异常
【发布时间】:2012-05-10 00:20:32
【问题描述】:

您好,我尝试按照以下步骤为 Google Drive Api 设置 Google 代码示例: https://developers.google.com/drive/examples/php

但是当我尝试身份验证时出现异常:

异常 'apiAuthException' 带有消息'获取 OAuth2 时出错 访问令牌,消息:'redirect_uri_mismatch'

知道我是否会在配置过程中遗漏一些东西吗?

谢谢

【问题讨论】:

    标签: php google-drive-api


    【解决方案1】:

    您是否在 API 控制台中注册了应用程序并让重定向 URI 与您的 Web 服务器的 URI 匹配?

    您是否在 config.php 中设置了 REDIRECT_URI(连同 CLIENT_ID、CLIENT_SECRET)?

    https://developers.google.com/drive/examples/php#setting_up_the_client_id_client_secret_and_other_oauth_20_parameters

    【讨论】:

    • 谢谢你,这是 config.php 中的问题,我错过了这个字段 ;)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多