set event id on google calendar java

后端 未结 2 905
悲哀的现实
悲哀的现实 2021-01-21 08:39

I tried to set the eventId on google calendar v3 api in Java, but it gave me 400 error with \"message\": \"Invalid resource id value.\". Is there any way to set the event Id of

2条回答
  •  独厮守ぢ
    2021-01-21 09:07

    I dont know why you cant set the id manually, I recently do that, because I wanted to know the id to retrieve it later. and I dont have any problem. probably you are doing it wrong.

    Event event = new Event();
    event.setId("cita1");
    client.events().insert("primary", event).execute();
    

    no errors

提交回复
热议问题