Skip to main content
POST
/
v2
/
auth
/
tokens
/
import
Import Oauth Token
curl --request POST \
  --url https://api.example.com/v2/auth/tokens/import \
  --header 'Content-Type: application/json' \
  --data '
{
  "provider_id": "<string>",
  "access_token": "<string>",
  "refresh_token": "<string>",
  "expires_in_seconds": 123,
  "scopes": [],
  "metadata": {},
  "is_default": true
}
'
{
  "token_id": "<string>"
}

Body

application/json

Import a directly-obtained OAuth token (no authorization-code exchange).

Used by the Slack managed-install flow, which receives a bot token inline from apps.managedInstall rather than via the browser OAuth redirect. The token is persisted for the caller's org/user against provider_id (which must already exist in the caller's org).

provider_id
string
required
access_token
string
required
refresh_token
string | null
expires_in_seconds
integer | null
scopes
string[]
metadata
Metadata · object
is_default
boolean
default:true

Response

Successful Response

Response for a token import — the created token id only, no secrets.

token_id
string
required