Calendar IDs are not writable and are generated by the server. Event IDs can be generated as specified in the event creation documentation.
As per the documentation on Events: insert:
id:stringOpaque identifier of the event. When creating new single or recurring events, you can specify their IDs. Provided IDs must follow these rules:
- characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938
- the length of the ID must be between 5 and 1024 characters
- the ID must be unique per calendar Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. If you do not specify an ID, it will be automatically generated by the server.
Note that the
and theicalUIDare not identical and only one of them should be supplied at event creation time. One difference in their semantics is that in recurring events, all occurrences of one event have differentids while they all share the sameids.icalUID
As for the Calender ID, as you can see from the Calendar resource page, the is not writable.id