Shortcuts are invokable entry points to apps. The shortcut() method supports both global shortcuts and message shortcuts. This is handy for existing applications looking to add support for org wide installations and not spend time updating all of these web-api calls. Bolt for JavaScript will attempt to infer the team_id based on incoming payloads and pass it along to client. Since the introduction of org wide app installations, some web-api methods now require team_id to indicate which workspace to act on. If the incoming request is not authorized or you’re calling a method from outside of a listener, use the top-level app.client.Ĭalling one of the WebClient’s methods will return a Promise containing the response from Slack, regardless of whether you use the top-level or listener’s client. Your Bolt app also has a top-level app.client which you can manually pass the token parameter. The built-in OAuth support handles the second case by default. This uses either the token that initialized your app or the token that is returned from the authorize function for the incoming event. You can call any Web API method using the WebClient provided to your app’s listeners as client.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |