X Tutup
Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 1.17 KB

File metadata and controls

29 lines (25 loc) · 1.17 KB
title lang slug order
Using the Web API
en
web-api
4
You can call [any Web API method](https://api.slack.com/methods) using the [`WebClient`](https://slack.dev/python-slack-sdk/basic_usage.html) provided to your Bolt app as either `app.client` or `client` in middleware/listener arguments (given that your app has the appropriate scopes). When you call one the client's methods, it returns a `SlackResponse` which contains the response from Slack.

The token used to initialize Bolt can be found in the context object, which is required to call most Web API methods.

Refer to the module document to learn the available listener arguments. ```python @app.message("wake me up") def say_hello(client, message): # Unix Epoch time for September 30, 2020 11:59:59 PM when_september_ends = 1601510399 channel_id = message["channel"] client.chat_scheduleMessage( channel=channel_id, post_at=when_september_ends, text="Summer has come and passed" ) ```
X Tutup