HTTP GET:获得通过谷歌日历API第3版谷歌日历事件列表 - 无效键错误 [英] HTTP GET: Get Google Calendar Event List via Google Calendar API v3 - invalid key error

查看:287
本文介绍了HTTP GET:获得通过谷歌日历API第3版谷歌日历事件列表 - 无效键错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Android 4.4的塔斯克一个HTTP GET行动现在相当长的一段时间,以便让我的未来谷歌日历事件。由于谷歌关闭版API该任务将不再有效。

I was using an HTTP GET action on Tasker on Android 4.4 for quite some time now in order to get my future google calendar events. This task no longer works due to Google shutting down the v2 API.

有关的API V3需要的鉴别。我试图让从开发者控制台客户端密钥。我创建了一个新的项目,并启动了日历API它。然后,我创建了一个新的客户端ID和做有其相应的键此客户端ID。我怎样才能通过HTTP GET从我个人的谷歌日历我的(未来)的事件列表,该鉴别信息?我试图使用方法:

For the API v3 an authentification is needed. I tried to get a client key from the developer console. I created a new project and activated the calendar API for it. I then created a new client ID and do have this client ID with its corresponding key. How can I get a list of my (future) events from my personal Google calendar via HTTP GET and this authentification information? I'm trying to use:

<一个href=\"https://www.googleapis.com/calendar/v3/calendars/my_calendar_ID/events?singleEvents=true&key=my_client_key\" rel=\"nofollow\">https://www.googleapis.com/calendar/v3/calendars/my_calendar_ID/events?singleEvents=true&key=my_client_key

这会返回一个错误:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "keyInvalid",
    "message": "Bad Request"
   }
  ],
  "code": 400,
  "message": "Bad Request"
 }
}

我是什么做错了吗?在此先感谢!

What am I doing wrong? Thanks in advance!

推荐答案

通常,当请求中使用的密钥无效引发此错误。在要求你必须使用公钥而不是客户端密钥(当你要发送的API密钥)。下面是关于如何得到公众的文档在链接关键看你的应用程序。

Usually this error is thrown when the key used in the request is invalid. In the request you have to use the public key not the client secret(when you want to send the API key). Here is the link for the documentation on how to get the public key to your application.

此外,这里是文档链接有关事件的HTTP请求GET请求。

Also,here is the link for documentation about the HTTP request for events get request.

这篇关于HTTP GET:获得通过谷歌日历API第3版谷歌日历事件列表 - 无效键错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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