How do I save a monday.storage item using mondaySdk.MondayServerSdk?

I’m trying to use monday.storage.setItem on the server side (like you can in client-side code), but monday.storage is not present.

How do I achieve something like this?

const monday: mondaySdk.MondayServerSdk = mondaySdk({ token: shortLivedToken, apiVersion: '2023-10' });

monday.storage.setItem(key, JSON.stringify(payload)).then(() => {
  //   ^^^^^^^
  //   missing, so won't work on server-side
  console.log(' ✅ item view configuration saved to storage ');
});

Oh, it’s “easy” if you’re using monday-code.

@benhowes & @dipro recommend this:

await storage.set(key, value, {  shared:true });

shared means its accessible on the client side.

See: apps-sdk for monday code

1 Like

My understanding is the apps-sdk will work even without monday-code for regular monday.storage. I don’t think it works for secure storage though.

good morning thanks for information how can i get the <ACCESS_TOKEN> ?