Skip to main content
Question

Post to team as a different user

  • August 11, 2022
  • 1 reply
  • 206 views

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);
    }
}

1 reply

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2340 replies
  • August 12, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings