Sample - Slack Web API
GET/auth.test

Verify an authentication token

Verifies the authentication token and retrieves the identity and team associated with it. Use the returned team and user identifiers to confirm which team and user the authenticated user represents.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
tokenstringrequired
Authentication token supplied in the request header; the required scope is `none`.

2 status codes
200Returns `ok` set to true, the workspace URL and name, `team_id`, `user`, and `user_id`; an enterprise installation may also include `is_enterprise_install` and `bot_id`.
bot_idstringoptional
is_enterprise_installbooleanoptional
okbooleanrequired
Allowed:true
teamstringrequired
team_idstringrequired
urlstringrequired
userstringrequired
user_idstringrequired
defaultReturned when the token is invalid, revoked, inactive, or the request cannot be parsed; the response contains `ok` set to false and an `error` value.
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:not_authedinvalid_authtoken_revokedaccount_inactiveinvalid_arg_nameinvalid_array_arginvalid_charsetinvalid_form_datainvalid_post_typemissing_post_typeinvalid_jsonjson_not_object
okbooleanrequired
Allowed:false

Error handling

token must be supplied in the request header as a valid authentication token. The token must resolve to a team and user identity for the response to include the required identifiers.