Link your Slack account with the token from the link `/oncall` replied with in Slack.
const url = 'https://api.siteqwality.com/user/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/contact_method/slack_link';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siteqwality.com/user/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/contact_method/slack_link \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”User identifier: the signed-in user
Request Body required
Section titled “Request Body required ”Link a Slack account with the token from a /oncall link.
object
The token query parameter of the “Link your Slack account” link.
Example generated
{ "token": "example"}Responses
Section titled “ Responses ”Already linked: the user’s existing Slack DM to this Slack member
object
Stored details with a Slack DM token masked.
A Slack DM linked from /oncall sends through this Slack integration; no token is stored.
The linked Slack integration’s name, while it is connected.
Example
{ "type": "email"}Linked: a verified Slack DM that sends with the workspace’s Slack integration, and default rules for urgencies the user has none for
object
Stored details with a Slack DM token masked.
A Slack DM linked from /oncall sends through this Slack integration; no token is stored.
The linked Slack integration’s name, while it is connected.
Example
{ "type": "email"}The link is invalid (slack_link_invalid) or expired (slack_link_expired)
Missing or invalid authentication
Only the user, signed in to the dashboard, may link their own Slack account
This account has not connected the Slack workspace (slack_workspace_not_connected)
The workspace’s Slack integration is turned off (slack_workspace_disabled), another member of the account already has this Slack account (slack_member_linked_elsewhere), or the user has 20 contact methods (contact_method_limit_reached)
Internal server error