Skip to content

Work in progress

This documentation page is currently work in progress.
Not all existing DecAPI endpoints are documented here yet - mostly Twitch and YouTube endpoints. The rest of the endpoints should have accurate documentation :)
For the currently active documentation, please visit docs.decapi.me.

Random Subcriber - Get random subscriber from a Twitch channel

Retrieves one or more random subscribers for the specified Twitch channel.

Requires channel owner to have authorized DecAPI for subscriber access

The channel owner must authorize DecAPI to access their subscriber data in order for this endpoint to return subscriber information.

If the channel owner already uses other DecAPI Twitch endpoints with subscriber data access, such as subcount or subpoints, then no further action is needed.

If you are the channel owner, you can authorize DecAPI via this link: Authorize DecAPI for Twitch Subscriber Access

Endpoint URL

https://decapi.me/twitch/random_sub/CHANNEL_USERNAME_HERE

Required URL parameters

  • channel - Required - Twitch channel to pick a random subscriber from.

Query parameters

  • count - Optional - The number of subscribers to retrieve. Default: 1. (int)
  • field - Optional - Which field from the subscriber object to return (see Twitch API for available fields)
    • Default: user_name, otherwise known as the "Display name" (e.g. username with capitalization, or localized display names).
    • If you want the actual Twitch username (all lowercase, no special characters), use user_login.
  • separator - Optional - Characters to separate multiple values with. Default: ,

Examples

Examples for bots

Nightbot

Note: Nightbot will automatically convert variables, such as $(channel) or $(touser) to the correct channel name / username, when the command is used.
You do not have to change those variables.

Fossabot

Note: Fossabot will automatically convert variables, such as $(channel) or $(user.login) to the correct channel name / username, when the command is used.
You do not have to change those variables.

StreamElements

Note: StreamElements will automatically convert variables, such as ${channel} or ${touser} to the correct channel name / username, when the command is used.
You do not have to change those variables.

Streamlabs Chat Bot

Note: Streamlabs Chat Bot will automatically convert variables, such as $mychannel or $touserid to the correct channel name / username, when the command is used.
You do not have to change those variables.

Streamlabs Cloudbot

Note: Streamlabs Cloudbot will automatically convert variables, such as {channel.name} or {touser.name} to the correct channel name / username, when the command is used.
You do not have to change those variables.

Deepbot

Note: Deepbot will automatically convert variables, such as @stream@ or @user@ to the correct channel name / username, when the command is used.
You do not have to change those variables.

PhantomBot

Note: PhantomBot will automatically convert variables, such as (channelname) or (touser) to the correct channel name / username, when the command is used.
You do not have to change those variables.