1halfazn
1halfazn

Reputation: 403

Slack API: Is there a way to determine which user clicked on a button in an interactive message?

I am new to Slack's API, so bear with me. I have a slack button that contains a simple webhook link which, when clicked, updates a record somewhere on my site. However, I need to determine which user clicked the button and send this info back to my site in order to fill out an updated_by field with the user's name. The only way I see to do this is to somehow update the post request body with a variable containing the user's name?

Upvotes: 0

Views: 1643

Answers (1)

Suyash Gaur
Suyash Gaur

Reputation: 2891

You need to handle interaction with the buttton.
https://api.slack.com/reference/interaction-payloads/block-actions

The payload received contains the SlackId of the user who clicked the button.

Upvotes: 1

Related Questions