You are viewing a section of Superface that will be deprecated in Q4 2023. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit superface.ai/docs/migrate.

Chat Channels

chat/channels@1.0.2
2 providers

Get Channels

Retrieve paginated list of channels, e.g. text channels in slack or discord

Input
Workspace
Channel Visibility Filter
Limit
Page
Result
Channels
Next Page
Rate Limit

1.Choose a provider

2.Use GetChannels with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk

Structure details

Input (object)

workspace
Representation of a workspace. Can be guild or workspace, depending on the provider capability.
visibility
Limit the listing to either public or private channels; all channels are listed by default.
limit
Maximum number of channels to retrieve
page
Identification of page with paginated results (cursor)

Example

Result (object)

channels
List of retrieved channels
id
Unique identifier of the channel
createdAt
UNIX timestamp (in milliseconds, e.g. 1095379198750) when the channel was created
name
Name of the retrieved channel
description
Description of the channel. Can describe purpose or use of the channel.
membersCount
Number of members of the retrieved channel
nextPage
Cursor to the next page of listing
rateLimit
Rate limit details
bucket
Different parts of API may have different rate limits. Bucket identifies to which part of API the rate limits apply.
totalRequests
Total requests available in the time window.
remainingRequests
Remaining requests available in the time window.
remainingRequestsPercentage
Remaining requests available in the time window in percents.
resetTimestamp
Unix timestamp when the rate limits will reset (in milliseconds).
resetAfter
Number of seconds until reset of rate limit
retryAfter
Number of seconds until user can retry the request

Example

Implementation details

Provider
mock
Use case
GetChannels
Author
@superface
Source
Verified