1
I’m using Scribe
to authenticate with the API
of Google Calendar
.
Authentication with Google is successfully done by returning the accessToken
hassle-free.
When I try to add one CalendarList
, through the following code:
OAuthRequest request = new OAuthRequest(Verb.POST, "https://www.googleapis.com/calendar/v3/users/me/calendarList");
JSONObject message = new JSONObject();
message.put("id", "Teste 1");
request.addPayload(message.toJSONString());
service.signRequest(accessToken, request);
Response response = request.send();
Google returns the following error this api does not support parsing form-encoded input
How should I build the JSON request to get a response from Google?