Skip to main content

chat.getPermalink method

Facts

DescriptionRetrieve a permalink URL for a specific extant message
Method Access
GET https://slack.com/api/chat.getPermalink
ScopesNo scopes required
Content types
application/x-www-form-urlencoded
application/json

Arguments

Required arguments

tokenstringRequired

Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.

Example: xxxx-xxxxxxxxx-xxxx
channelstringRequired

The ID of the conversation or channel containing the message

message_tsstringRequired

A message's ts value, uniquely identifying it within a channel

Usage info

Easily exchange a message timestamp and a channel ID for a friendly HTTP-based permalink to that message. Handles message threads and all conversation types.


Response

Standard success response

{
"ok": true,
"channel": "C123ABC456",
"permalink": "https://ghostbusters.slack.com/archives/C1H9RESGA/p135854651500008"
}

When the provided message_ts is part of a thread, the permalink format changes. Note that the p135854651700023 value in the example below was to the threaded message, and the query parameters refer to the top-level message.

{
"ok": true,
"channel": "C123ABC456",
"permalink": "https://ghostbusters.slack.com/archives/C1H9RESGL/p135854651700023?thread_ts=1358546515.000008&cid=C1H9RESGL"
}

Error response when channel cannot be found