Skip to main content

oauth.access method

Welcome to the new home of Slack developer docs!

We're still building and not all features are available quite yet. Enjoy this peek into the future!

Not ready for the future? Return to the past at api.slack.com.

Usage info

This is a legacy method only used by classic apps.

This method allows you to exchange a temporary OAuth code for an API access token.

This is the third step of the OAuth authentication flow.

We strongly recommend supplying the Client ID and Client Secret using the HTTP Basic authentication scheme, as discussed in RFC 6749.

If at all possible, avoid sending client_id and client_secret as parameters in your request.

Keep your tokens secure. Do not share tokens with users or anyone else.

When used with a legacy workspace app, this method's response differs significantly.

A potential gotcha: while redirect_uri is optional, it is required if your app passed it as a parameter to oauth/authorization in the first step of the OAuth flow.

Response

The response schema for this step of OAuth differs depending on the scopes requested and the type of application used. When asking for the bot scope, you'll receive the token separately from the user token.

enterprise_id will be populated if the installing team is part of an enterprise. Otherwise, it will be null.