레퍼런스HTTP APILinked accounts

Start linking the caller's Slack account

POST
/v1/linked-accounts/slack/start

Returns Slack's consent URL and sets a one-time state cookie for the callback, valid ten minutes. Scopes are openid profile; no email is requested. The consent is for the workspace's link app; a workspace without one gets it made now with its App Configuration Token (once: concurrent starts share it), unless the installation names a fallback OIDC app. Refused with 409 when the workspace has no verified Slack install, or nothing to link with. API keys are refused.

Auth: cookie session only; no scope. Idempotency-Key: ignored.

Authorization

cookieSession
cookie__Host-werft_session<token>

For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.

Header Parameters

X-Requested-With?"werft-web"

Required with a cookie session: the literal werft-web.

Value in"werft-web"

Response Body

Success

application/json
  1. response
authorize_url*string
Formaturi
expires_at*string

When this link request lapses: the callback must come before it. Not a linked account's expires_at, which is its provider token's expiry.

Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
Example Request
curl -X POST 'https://example.com/v1/linked-accounts/slack/start'
Example Response
{  "authorize_url": "http://example.com",  "expires_at": "2019-08-24T14:15:22Z"}