【问题标题】:Using C2DM with OAuth2 - Error Authorizing the API将 C2DM 与 OAuth2 一起使用 - 授权 API 时出错
【发布时间】:2012-06-19 17:23:00
【问题描述】:

我正在尝试将 C2DM 与 OAuth2 结合使用。我关注了这篇文章:http://www.roosmaa.net/getting-started-with-android-c2dm 和另一篇与此非常相似的文章,但每次我尝试授权范围“https://android.apis.google.com/c2dm”(在https://code.google.com/oauthplayground/) 我总是收到以下错误:

Error: redirect_uri_mismatch
  The redirect URI in the request: https://code.google.com/oauthplayground did not match a   registered redirect URI

  Request Detail:

  Request Details
  scope=https://code.google.com/oauthplayground
  response_type=code
  redirect_uri=https://code.google.com/oauthplayground
  access_type=offline
  approval_prompt=force
  client_id=xxxxxxxxxx.apps.googleusercontent.com

有人可以给出一些提示如何解决这个问题吗?

提前致谢!

【问题讨论】:

  • 您是否真的在 google API 控制台中注册了https://code.google.com/oauthplayground

标签: android oauth-2.0 android-c2dm


【解决方案1】:

您必须授权https://android.apis.google.com/c2dm

【讨论】:

  • 嗨,伯特。我已经做到了......仍然没有运气。其实我的问题有一个错字。我确实在尝试授权android.apis.google.com/c2dm....
  • 嗨 Valdemar,您是否尝试删除 Google APIs Console 中的 API 项目并从头开始?确保选择Web应用程序,点击more options并将Authorized Redirect URIs的现有内容替换为https://code.google.com/oauthplayground i> 并清除 Authorized JavaScript Origins
猜你喜欢
  • 2018-12-16
  • 2019-05-27
  • 1970-01-01
  • 2013-02-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-12-31
  • 1970-01-01
相关资源
最近更新 更多