Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you set a Calendar ID when inserting in Google API?

When using the test API in Google's documentation for calendar.calendars.insert I always get back Invalid resource id value. as a response when setting the request like this

{
    "summary": "Events",
    "description": "This is where you will keep your events",
    "id": "test.events"
}

The documentation says that the id can be any string as long as it doesn't have two consecutive dots and it is longer than 0 and shorter than 101.

What am I doing wrong? I would like to be able to set the id so I don't have to store the id that has random characters in my database.

like image 758
Adam Keenan Avatar asked Nov 01 '22 23:11

Adam Keenan


1 Answers

You don't set the calendar ID Google Assignes it a Calendar id.

I would assume a Calendar IDs is a primary key and there for must be unique. Google cant allow you to insert your own because then they would have to assume that every programmer bothered to check first that they didn't have one with that ID already.

like image 82
DaImTo Avatar answered Nov 09 '22 08:11

DaImTo