Skip to main content

When I use the team messaging create post endpoint, it posts a message with my extension as the author. Is it possible to make the author of the post a different extension user, one made specifically for using the API? The documentation doesn't seem to show a parameter for specifying author of the post. If it is always the "logged in" user, is there a way to change that user? I'm using JWT authorization flow and Node.js client libraries.

Here is my current code:

async function create_post() {
try {
var resp = await platform.post('/restapi/v1.0/glip/chats/chatid/posts', {
text: 'Testing...'
});
var jsonObj = await resp.json();
console.log("Post Created");
console.log(jsonObj);
} catch(e) {
console.log(e.message);
}
}

Unfortunately, this is not allowed. The server automatically identifies the user using the access token and post messages for that user. So if you need to post on behalf of another user, you need to have the access token of that user.


Reply