【发布时间】:2014-12-13 12:15:00
【问题描述】:
按照本教程http://www.androidhive.info/2012/01/android-json-parsing-tutorial,我已对其进行了调整,以使用此 URL“https://www.googleapis.com/calendar/v3/calendars/[calendar_ID]/events?singleEvents=true&orderBy=startTime&key=[my_API_key]”而不是示例中的 URL 来解析公共谷歌日历。此日历是公开的。
当我执行应用程序时,响应是这样的:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration.",
"extendedHelp": "https://console.developers.google.com"
}
],
"code": 403,
"message": "Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration."
}
}
问题出在哪里?我做错了什么?
【问题讨论】:
-
检查给定的api密钥是否有效,如果无效意味着您的api密钥在您的Gmail登录时已在Google api服务中注册。
-
终于找到问题了,谢谢。我在答案中解释了。
标签: android google-api google-calendar-api