I’ve only been using the Miro API for a couple of hours, and I searched the board for a solution to this problem, but nothing came up.
I’m trying to use the API to update sticky notes with new text from an Airtable database. My test code in an Airtable scripting block is successful in retrieving all widgets on a board and isolating those widgets that are sticky notes, but I’ve hit a snag when attempting to update them. The API docs only show a partial code example for updating a widget, and while I can successfully update one of these sticky notes interactively using the “Try It” button in the docs, my code always returns a 415 error: “Unsupported Media Type”. I’m only trying to update the widget text, so I don’t know why this media-type error is coming back.
Here’s how I’m setting up the fetch options:
The docs list a “RAW_BODY” body parameter, but the code example doesn’t show where this should go. I’ve tried adding an outer object with that parameter wrapped around the main object, but that returned the same error. I’ve also removed JSON.stringify() from around the body object and it still returns the same error, so I’m not even sure if the string conversion is necessary.
Can someone please shed some light on how this is supposed to be formatted to update the sticky text correctly?
Best answer by Anthony RouxView original