Cannot get Google's TRY THIS API To work For FREEBUSY

邮差的信 提交于 2020-04-17 22:10:50

问题


I asked this question a couple days ago, and I appreciate (and accepted) the answer. Unfortunately, like most issues, it just let to another question.

My Question

why can't I get this "TRY THIS API" to work for me?

{
  "calendarExpansionMax": 0,
  "groupExpansionMax": 0,
  "items": [
    {
      "id": "https://calendar.google.com/calendar/embed?src=en.indian%23holiday%40group.v.calendar.google.com&ctz=America%2FLos_Angeles"

    }
  ],
  "timeMax": "2020-05-09T16:39:57-08:00",
  "timeMin": "2020-05-05T13:39:57-08:00",
  "timeZone": "UTC"
}

I suspect it has something to do with the ID I'm asking for I've tried the below syntax to test on an indian calendar here.

  • ZW4uaW5kaWFuI2hvbGlkYXlAZ3JvdXAudi5jYWxlbmRhci5nb29nbGUuY29
  • https://calendar.google.com/calendar/embed?src=en.indian%23holiday%40group.v.calendar.google.com&ctz=America%2FLos_Angeles

I've also tried a couple integers as the limit I've clicked the "ok" to allow it run the API so it confirms my identity on. But I keep getting this "reason":"notfound".

What am I doing wrong?

Click here to see image error

Sorry, I know the answer to this is probably so obvious. I feel various tutorial videos/websites that have anything to do with API's are always a rabbit hole of directing viewers to go find out a bunch of other information not covered in the tutorial's website (in the case of my previous question, the accepted answer did this, but this is a help board so I would expect that).

Thanks.


回答1:


Solution

The ID you are using is not your actual calendar id, that is why it is not working.

Follow these steps to find your calendar ID:

  1. go to your Calendar.
  2. Navigate to your subscribed/available Google calendars list.
  3. On the right of these you will find three vertical dots (see image), click those and select Settings and sharing.

  1. Go to the bottom of the new page that will open and under Integrate Calendar copy the value of the first item that will be Calendar ID.

Then just replace the ID you have for the actual one.

I hope this has helped you. Let me know if you need anything else or if you did not understood something. :)



来源:https://stackoverflow.com/questions/61218825/cannot-get-googles-try-this-api-to-work-for-freebusy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!