Hello Community,
I hope this message finds you well.
I’m currently working on a project where I need to access Storage from the backend on behalf of the user. The sessionToken is captured in an Item View Context when the user click to sends a request to the backend.
Allow me to provide some context and share what I have attempted so far:
Frontend Code (client-side Item view):
monday.get('sessionToken').then((token) => {
// send token to backend
}
Backend Request Handling Code (backend server):
import { Storage } from '@mondaycom/apps-sdk';
jwt.verify(token.data, MY_CLIENT_SECRET, (err, decoded) => {
if (err) {
// Handle token verification error
}
// token verified
const storage = new Storage(token.data);
const storageItem = await storage.get(KEY, options);
console.log(storageItem);
// log output
/*{
success: true,
error: 'You need to log in or sign up before continuing.'
}*/
});
Questions:
-
Is it feasible to access storage from the Monday.com SDK using a session token obtained during an Item View interaction?
-
Are there specific limitations or considerations regarding the usage of sessionTokens for storage operations?
-
What is the difference between this auth approach, and using the
shortLivedToken
in the integration trigger flow?
I’m eager to understand whether the current approach is technically feasible and if there are any best practices or guidelines I should follow.
Thank you for your time and expertise!
Best regards,