1

Hi I want to add functionality to our slack app that when slash command is used, it posts message from the actual command executer (not from a bot)

for example if person Foo Bar posts message using slash command /treats in channel where app bot invited as below /treats thank you @jon_doe for your help and expected message is Foo Bar : thank you @jon_doe for your help not like MY APP BOT : thank you @jon_doe for your help

do I need to store every user's token and use accordingly in client.chat.postMessage or is there safer, simpler way to achieve this?

M.K. Kim
  • 481
  • 1
  • 4
  • 17

1 Answers1

1

The only way to post a message from a user is to use the user's token and call the chat.postMessage method.

Yes, you will need to store every user's token if you would like your app to be able to post on every user's behalf.

Jason
  • 121
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 27 '22 at 17:25