How can call Parse.Cloud.run by specific user in javascript api?
Server code
Parse.Cloud.define('createChatRoom', async (req, res) => {
if (req.user == null) {
res.error({
message: 'No request user',
});
}
...
}
You can input user's sessionToken to third parameter object is not expressed in official doc.
Parse.Cloud.run(
'createChatRoom',
{ title: roomTitle },
{ sessionToken: user.getSessionToken() } // User specific user's session
);