Go to Slack

Create a Slack app and authenticate with Postman

By John Agan

Introduction

This step-by-step guide will walk you through setting up a Slack App and then introduce you to Slack's OAuth authentication flow using an indispensable tool, Postman.

Prerequisites

Getting Started

Navigation

Creating a Slack App can be initiated from the App Directory by clicking Build in the top right of the page or navigating directly to the Create App page.

Click Build From the App Directory

Navigating the corridors of developer experience

Click Get Started with Slack Apps

Getting started

Create Slack App

Fill out all the required fields. Notice there is a team selector on the right. This is because every Slack must be associated to a Team. This is where the App will live, but it does not mean users of the App will have access to that Team.

If you're following along with Postman, make sure you use Postman's redirect URI: https://www.getpostman.com/oauth2/callback

Creating your app

OAuth Information

From the left navigation menu, click OAuth & Permissions to access the OAuth information. To authenticate into the App, you'll need the OAuth Client ID and Client Secret. For this tutorial, we will copy this information into Postman.

OAuth

Postman

Authorizations

Now that we have a Slack App to authorize against, we will setup an OAuth 2.0 client. In this tutorial, we will use Postman's Authorization to walk through the flow.

Type

In Postman's Authorization menu, select OAuth 2.0 for the type

Postman configuration

Get Token

Once OAuth 2.0 is selected as the type, click the Get New Access Token button to open the OAuth configuration modal.

Get that access token

Configure

Here we will setup the OAuth client. We'll pull information from multiple sources to complete this form. Find more information on Slack's OAuth flow in the docs.

  • Auth URL: https://slack.com/oauth/authorize
  • Access Token URL: https://slack.com/api/oauth.access
  • Client ID: Copy the Client ID value from Slack's OAuth Information page
  • Client Secret: Copy the Client Secret value from Slack's OAuth Information page
  • Scope: A space-separated list of OAuth scopes. A complete list of scopes are here.

Scopes

Authorize

If you set everything up correctly and pressed Request Token, you should see a familiar Slack authorization window. Select the team you would like to authorize and validate your scopes match what's presented.

Authorization

Success

After you click Authorize, Slack will return Postman a payload that is saved for future use. You can inspect the payload and find the details of that authorization.

Secret of our success

Related documentation