Hey everyone, I’m following thishttps://developers.miro.com/docs/working-with-sticky-notes-and-tags-with-the-rest-api and after obtaining my oath for my app and plug that in the code, plus added the board id from https://miro.com/app/board/uXjXXXXXXXX/ where uXjXXXXXXXX(censored) is the board id and i get the following error:
‘
const sticky = await board.createStickyNoteItem({
^
TypeError: board.createStickyNoteItem is not a function
‘
Complete code:
// Using miro-api client library
const { MiroApi, ShapeItem } = require("@mirohq/miro-api");
const api = new MiroApi('eyJtaXJvLm9yaWdpXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
const board = api.getBoard('uXjXXXXXXXX')
async function main() {
const sticky = await board.createStickyNoteItem({
data: {
content: "I'm a sticky note",
shape: "square",
},
style: {
fillColor: "light_yellow",
textAlign: "center",
textAlignVertical: "top",
},
position: {
x: 0,
y: 0,
},
})
}
main()
I think the issue is with permissions or things like that but I’ve checked my team and app and it has write and read permissions for the team boards.
Any tip?
thanks