Web API basics
The Web API works like a standard REST API — you send a request, you get a response. Communication happens over XHR requests, making it easier to implement than the RTM API and a good fit for stateless integrations like syncing chat data, triggering automations, or building tools that react to events via webhooks. If you need a persistent, real-time connection instead — for example, to build a live custom chat interface — use the RTM API instead. Keep in mind that compared to RTM, Web API responses may have a slight delay.Rate limits
To prevent sending a massive number of requests, there are rate limits for method calls. After exceeding those limits, the requester will get aToo many requests error in the response of a specific request. After some time, the request will be unblocked so it can be sent again.
Pagination
Pagination is a mechanism that allows splitting the database output into more manageable chunks of data. Based on thelimit and sort_order parameters, pagination is able to decide how many records will be returned at once and whether it should fetch the oldest or the latest data first.
Any filters that could be applied should be provided in the first pagination request. In the response, you’ll get the next_page_id and previous_page_id parameters. You should make the subsequent request using one of these parameters as page_id, depending on the direction of iteration: forward or backward.
The filters, limit, and sort_order parameters can’t be provided along with page_id.
The maximum duration of the page_id parameter before it expires is one month.
Calling the API as a bot
To call the API as a bot, you need to use the bot token. You can generate it using the Issue Bot Token method.Keep exploring