Creating a Custom OAuth App
Create a Custom OAuth App
Complete the following procedure to obtain the OAuthClientId, OAuthClientSecret, and CallbackURL.
Create an App
Create an app to obtain the OAuth client credentials, the OAuthClientId and OAuthClientSecret. To create your app, go to https://api.slack.com/apps. Specify an app name and the app's workspace. You can see the Client Id and Client Secret listed in the App Credentials section under Basic information.
Set a Callback URL
After creating your application, define your app's CallbackURL:
- In your app settings, go to OAuth & Permissions
- In the Redirect URLs section click Add a New Redirect URL.
- Set the callback URL to http://127.0.0.1:33333, or another port of your choice. Ensure that you save the URL.
Configure Permission Scopes
Follow the instructions below to configure the API permissions your app requests. In order to use all possible features, the necessary scopes are: channels:read, groups:read, im:read, mpim:read, channels:write, groups:write, im:write, mpim:write, channels:history, groups:history, im:history, mpim:history, search:read, chat:write:user, chat:write:bot, files:read, files:write:user, pins:read, pins:write, usergroups:read, usergroups:write, reminders:read, reminders:write, users:read, users.profile:write.
These values are all sent as default scopes in the GetOAuthAuthorizationURL and GetOAuthAccessToken procedures, but
- In your app settings, go to the Scopes section, under OAuth & Permissions.
- In the Select Permission Scopes subsection, click the menu to add permissions by scope or API method.
Distribute Your App
To allow users in other workspaces to install your app, follow the instructions below:
- In your app settings, click Manage Distribution under the Settings section.
- Complete the procedures to set a callback URL and configure permissions.
- Click Activate Public Distribution.