谷歌日历API访问未配置 [英] Google Calendar API access not configured

查看:247
本文介绍了谷歌日历API访问未配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了一个样本项目从这里开始: <一href="http://$c$c.google.com/p/google-api-java-client/source/browse/calendar-android-sample/?repo=samples" rel="nofollow">http://$c$c.google.com/p/google-api-java-client/source/browse/calendar-android-sample/?repo=samples

I've downloaded a sample project from here: http://code.google.com/p/google-api-java-client/source/browse/calendar-android-sample/?repo=samples

我执行的所有不同之处在于所描述的步骤检索使用密钥的Eclipse插件的SHA1键。当我在我的手机上运行该应用程序但是,它显示了一个不配置访问错误信息 下面是从LogCat中:

I performed all the steps as described except that retrieved the SHA1 key using the Keytool plugin for Eclipse. When I run the app on my phone however, it shows an Access not configured error message The following is from the LogCat:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
 "code": 403,
   "errors": [
     {
       "domain": "usageLimits",
       "message": "Access Not Configured",
       "reason": "accessNotConfigured"
     }
  ],
   "message": "Access Not Configured"
 }

我已经创建了谷歌控制台项目,启用日历的API,创建了OAuth2客户端ID,使用Eclipse中的SHA1键并没有看到任何错误maessages。我不能在控制台中看到一个客户的秘密,虽然。您是否有什么缺什么想法?

I have created a project in google console, enabled the calendar APIs, created an OAuth2 Client ID, used the SHA1 key from Eclipse and have not seen any error maessages. I can't see a client secret in the console though. Do you have any idea what is missing?

这些都是从Android清单的权限,如果你想知道。

These are the permissions from the Android Manifest, in case you're wondering.

enter code here


<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />

我是新来使用日历的API想创造我自己之前看到这个应用程序的工作。另外,我怀疑这有可能成为未来的一个问题,也是。

I'm new to using the calendar APIs would like to see this app work before creating my own. Also, I suspect this might become an issue in the future as well.

推荐答案

访问配置需要使用客户端API来进行。见左栏中的链接。

Access Configuration needs to be performed using the Client API. See the links in the left column.

既然你指定的范围,要求用户授权时,这种努力似乎是多余的。但必要的仍然。 http://www.tqis.com/eloquency/googlecalendar.htm

Since you have to specify scope when asking for user authorization, this effort seems redundant. But necessary nonetheless. http://www.tqis.com/eloquency/googlecalendar.htm

这篇关于谷歌日历API访问未配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆