How to add @ mention in response to slash commands in slack

Diego Allen

How can I make slack parse @someone mentions as links to the user instead of plaintext. I've been reading slack documentation on message formatting but still haven't figured it out. Here's an example of what I'm getting now:

{
  "text": "*username:* @alexis",
  "response_type": "ephemeral"
}

mention not parsed as link

Wilhelm Klopp

To make a proper "clickable" mention, you need to pass the unique user ID and not the plaintext name.

The format of the user ID is: U024BE7LHand a mention would look like this: <@U024BE7LH>

Ther user ID of the user that executed the slash command will be in the payload that slack sends to your endpoint. You can also look up user IDs by calling the users.list method, which will give you access to the user IDs of all the users in the team.

More information here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

slack slash commands show response only to channel

From Dev

How do I make slash commands work on my bot in Slack?

From Dev

How to mention wildcard in ansible commands

From Dev

Slack slash commands - show user-entered text?

From Dev

Slack Slash Commands trigger GET request with no query parms

From Dev

Slack slash commands - show user-entered text?

From Dev

Slack API not accepting \n for new line when using slash commands

From Dev

how to add slash separator in perl

From Dev

How to add trailing slash with varnish?

From Dev

How to add MS bot to slack?

From Dev

How to add a slash or why it isn't added?

From Dev

How to add text to href after a certain slash

From Dev

How to add response card

From Dev

How do I pull data from a Slack API response with WebClient?

From Dev

Slack Slash Command removes the message of the person who did the slash command

From Dev

How to add commands to VisualStudio console?

From Dev

How add commands to cygwin - npm

From Dev

How to add javascript variable in the commands

From Dev

Calling Jenkins from Slack slash command

From Dev

Slash Commands - Discord.js

From Dev

How do you add a trailing slash to a PUT request in Backbone?

From Dev

How to add a trailing_slash to all urls without in Rails 4?

From Dev

How add a trailing slash after the port in apache URIBuilder?

From Dev

How to add a trailing_slash to all urls without in Rails 4?

From Dev

How to add double forward slash in a string without commenting out in Javascript?

From Dev

How To add slash between seo friendly url in opencart

From Dev

Add forward slash to string

From Dev

Add slash to an enumeration in Java

From Dev

Add slash to an enumeration in Java

Related Related

HotTag

Archive