0

I'm trying to do a batch call to get Calendars from Google. I've tried following several answers here on StackOverflow:

and also followed the Google Documentation:

Since the general endpoint (https://www.googleapis.com/batch) is deprecated, I'm using https://www.googleapis.com/batch/calendar/v3 to post to.

I'm posting a plain text body:

POST /batch/calendar/v3 HTTP/1.1

Content-Type: multipart/mixed; boundary="batch_foobarbaz"

--batch_foobarbaz
Content-Type: application/http

GET /calendar/v3/calendars/*calendarId1*

--batch_foobarbaz
Content-Type: application/http

GET /calendar/v3/calendars/*calendarId2*

--batch_foobarbaz--

The result I keep getting is:

{
    "error": {
        "code": 400,
        "message": "Failed to get multipart boundary.",
        "status": "INVALID_ARGUMENT"
    }
}

Can anyone tell me what I'm doing wrong here? Thanks!

  • Are you using the boundary in the Google example `boundary="batch_foobarbaz"` or are you using the one for calendar `boundary=batch_google_calendar`? – Giselle Valladares Aug 23 '22 at 16:46
  • Could you provide more details as to where you are testing this and the programming language used if any? that way the community can help you by testing this if needed. See [How to ask a good question](https://stackoverflow.com/help/how-to-ask) – Yancy Godoy Aug 23 '22 at 17:01
  • Also,are you using `--batch_foobarbaz` on your implementation or the correct one `--batch_google_calendar`? – Giselle Valladares Aug 23 '22 at 17:01
  • @GiselleValladares I couldn't find this in the docs, but even when using it, it doesn't change the error. – Roel Wetzels Aug 24 '22 at 07:36
  • @YancyGodoy no language used, just a simple POST request in Postman – Roel Wetzels Aug 24 '22 at 07:37

0 Answers0