Like a picky eater, a user can choose to refuse any and all installs that seem to request permissions beyond what an app truly needs. Sure, you can request any scope you want-but final say always resides with the user installing your app. Otherwise, it's bot tokens all the way down. If you require access to RTM (say, because you're building your app behind a corporate firewall), you'll need to create a classic Slack app and use its bot token to call rtm.connect: New Slack apps may not access RTM For most apps, the Events API lets your app listen to Slack goings-on in a more structured, safe way. In that situation, you'll need a User Token. One notable exception to that rule is if you need to act as a specific user (for example, posting messages on behalf of a user, or setting a user's status). If you're confused about the difference between adding a Bot Token Scope or a User Token Scope, worry not:Īdd scopes to your Bot Token, not your User Token. It'll allow your app to post messages! While you're at it, add the channels:read scope so your app can gain knowledge about public Slack channels. Scroll down to the Scopes section and click to Add an OAuth Scope.įor example, try adding the chat:write scope to your Bot Token. You can select the scopes to add to your app by heading over to the OAuth & Permissions sidebar. Scopes give your app permission to do things (for example, post messages) in your development workspace. Preheat the oven and ready your app for action by requesting scopes. Don't fuss too much over either field-no matter what workspace you select, you'll still be able to distribute your app to other workspaces if you choose. If you haven't already, create a new Slack app with our easygoing UI:įill out your App Name and select the Development Workspace where you'll play around and build your app. So let's get cooking, starting with the first ingredient: creating an app. New Slack apps are safer for users to install, less prone to unexpected uninstalls, and even have new features not available to classic apps. This guide walks you through making a new Slack app using the Slack App Management UI.īy the end of this guide, your app will be poised to post messages, make response to mentions, and even use classic recipes like Slash commands and incoming webhooks. Using Slash commands and Incoming Webhooks.If you're an experienced chef, already familiar with seasons of Slack apps past, check out this quickstart guide that explains exactly what new ingredients have arrived to apps. We'll teach you how to craft a new Slack app from the ground up. This guide is for developers who've never followed a Slack app recipe before, but want to cook with the latest ingredients from the Slack platform.
0 Comments
Leave a Reply. |