Developer API

Changelog

What changed in the Developer API, and when.

The Developer API is versioned in its URL. Within /api/v1, changes are only ever additive: new endpoints, new event types and new fields. Nothing is renamed or removed, and no meaning changes. Your tool should ignore fields and event types it does not know.

The one exception so far is the entry on viewers on every platform: when viewers came to Gleem from Kick, the Twitch-only fields were replaced by ones that name the platform.

Developer widgets set overlay variables

  • variable.updated has source plugin when a developer widget changed the value: one the creator picked for it in the widget's settings.

Chat commands for overlay variables

  • PATCH /variables/{name} takes chat_command and chat_vips; variables carry both. Moderators (and VIPs where allowed) set a variable from chat with its command.
  • variable.updated has source chat for those changes. A taken command answers 409 command_taken.

Colour, image, video and on/off variables

  • Variables can be of type colour (#rrggbb), image and video (a Media Library ulid, or "") and toggle (true / false). value in variables and in variable.updated can now be a boolean.
  • New built-in stream.live (type toggle).

Built-in overlay values

  • GET /variables?builtins=1 adds builtins, the read-only live values Gleem fills itself (viewers, title, category, uptime, followers, members, the latest Gem message, the queue, the time). See Overlay variables.

Overlay variables

  • New endpoints under /variables read, set, count, create, rename and delete a creator's overlay variables, the {name} placeholders in their Overlay Editor scenes. See Overlay variables.
  • New scopes variables:read and variables:write.
  • New event type variable.updated: a variable got a new value, with variable (name, type, value, previous_value, version) and source (dashboard or api). Webhooks of OAuth apps need variables:read for it.

New members in the Stream Manager, and refunds off the leaderboard

  • New Stream Manager event type activity.membership: someone joined one of the channel's membership tiers on Gleem, with user, membership_id, tier, gems, source and test. It comes with platform gleem, like activity.gems.
  • A refunded queue entry now gives back the Gems it was bought with, even when the Treat's price changed since.
  • GET /leaderboard no longer counts Gems that came back with a refunded queue entry, so total_gems_spent is what a viewer actually spent. The ranking is still all time.

A Treat's channel reward puts the Treat in the queue

  • Redeeming a Treat's channel reward on Twitch or Kick now queues that Treat instead of giving a Trigger Ticket. treat.redeemed and queue.entry.updated carry payment_type channel_points for it, member as seen on that platform, and source twitch or kick on treat.redeemed.
  • The redemption stays unfulfilled on the platform while the request waits: completing the entry fulfils it, and refunding it gives the points back. Fulfilling or refunding it on the platform, or through PATCH /stream/{platform}/redemptions/{id}, completes or refunds the entry.
  • POST /queue/entries/{id}/refund can answer 409 refund_failed when the platform will not give the points back.
  • The dedicated Trigger Ticket reward still gives tickets.

Channel rewards and KICKs on Kick

  • Treats, the Trigger Ticket reward, the fishing game's reward and plugins' rewards can be on Kick too, each with its own cost there. Their redemptions arrive as activity.redemption with platform kick, in the same shape as Twitch's, and PATCH /stream/kick/redemptions/{id} accepts or rejects them. capabilities.redemptions is true on Kick once the creator reconnects Kick to allow rewards; until then the endpoint answers 403 platform_reconnect_required. See Redemptions.
  • New Stream Manager event type activity.kicks: KICKs sent on Kick, with user, amount, gift and message.
  • Plugins hear Kick redemptions of their own rewards as redemption with platform kick, and KICKs as cheer with currency kicks. PATCH /api/v1/plugin/redemptions/{id} resolves Kick redemptions too, and takes platform for one gleem.gg did not record.
  • Trigger Tickets bought with Kick channel points come as tickets.granted with platform kick.

Viewers on every platform

A viewer is now a Gleem member with an account on each platform Gleem knows them by: Twitch, Kick or both. These fields change, and the old ones are gone:

  • Members: data.member in every event, and member in REST answers (/tips, /queue, /leaderboard, /tickets/grant), lose twitch_id. They gain platform, platform_user_id and identities. platform, platform_user_id and login name the account the event came through, else the member's main one (Twitch, then Kick, then YouTube). identities lists every account as {platform, user_id, login}. Events stored before this change keep their old shape in the GET /events backlog.
  • GET /me: creator.twitch_id is replaced by creator.channels, the creator's channel on each platform as {platform, id, login}.
  • POST /tickets/grant: takes platform (twitch or kick) with user_id or login, instead of twitch_user_id or twitch_login. The error unknown_twitch_user is now unknown_user.
  • Stream Manager: the activity.gems user loses twitch_id.
  • Kick: subs, renewals and gift subs on Kick earn Trigger Tickets, so tickets.granted comes for Kick viewers too, with platform kick.

Going live on Kick

  • stream.online and stream.offline (webhooks, the Creator Events socket, plugins) now come for a stream on any linked platform, Kick included, once per stream: going live on Twitch and Kick at once is one stream. stream gains platform and platforms; stream.id is Twitch's stream id when Twitch went live first, else Gleem's id for the stream. stream.offline now carries stream too.
  • A creator who is only live on Kick shows as live (is_live in GET /me and elsewhere).
  • Stream Manager: new transient event stream.updated (Kick) with the channel's new title and category.
  • capabilities gains live_status. On Kick it needs channel:read; connections without it list it in missing_scopes.

Direct streaming to Kick, and to several platforms at once

  • GET /api/v1/stream/destinations lists kick destinations. A stream to a channel goes to every platform of it that is switched on.
  • Destinations gain enabled (the creator's switch for the platform) and limits (max_bitrate_kbps, keyframe_interval_seconds, limited_by): what the encoder has to keep for a stream to the channel, the lowest of its platforms that are on.

Kick and YouTube in the Stream Manager

Creators can link Kick and YouTube in Settings → Connections, and the Stream Manager covers them in the same shapes as Twitch. See Stream Manager.

  • {platform} takes kick and youtube, and GET /api/v1/stream lists both. reconnect_url for them opens the link flow in Settings → Connections.
  • capabilities gains chat_reply. It is false on YouTube, as is follows. redemptions and chatters are false on both, and their endpoints answer 422 platform_unsupported.
  • New errors: 409 stream_not_live (YouTube chat and bans need a live broadcast) and 404 not_found for a YouTube unban Gleem cannot lift. What a platform cannot do, such as a Kick timeout over 7 days, a YouTube chat message over 200 characters or clearing a Kick or YouTube category, answers 422 validation_failed.
  • The Stream Manager channel and the backlog carry platform kick and youtube. The new event type activity.super_chat is for YouTube Super Chats and Super Stickers. activity.subscription and activity.gift gain level_name, which is YouTube's membership level and null elsewhere.
  • platform on GET /stream/chat and /stream/activity accepts kick and youtube.

Direct streaming destinations

  • GET /api/v1/stream/destinations: where the creator can go live straight from the Gleem IRL app, their own channel's platforms and shared channels, with whether someone else is live there. See Direct streaming destinations.
  • PATCH /api/v1/stream/destinations/{id} and GET /api/v1/stream/destinations/{id}/categories: the stream title and category on a destination's channel.
  • GET /api/v1/irl/devices/{uuid}/playback answers 409 playback_direct_streaming while the device streams straight to a platform.

Bluetooth access to IRL Sidekicks

  • POST /api/v1/irl/devices/{uuid}/local-grant: a seven-day grant that lets the Gleem IRL app set up and control a paired IRL Sidekick over Bluetooth LE, also without internet. See Bluetooth access to an IRL Sidekick.
  • New error code local_access_unavailable (409), for an IRL Sidekick that has not registered its Bluetooth keys yet.
  • POST /api/v1/irl/local-grant: the same grant by the id the IRL Sidekick shows over Bluetooth, which also finds a team's IRL Sidekick.

Stream Manager redemptions

  • PATCH /api/v1/stream/{platform}/redemptions/{id} with status fulfilled or canceled: fulfil or refund a channel point redemption of a reward Gleem created. See Redemptions.
  • activity.redemption gains can_manage, true when the reward was created by Gleem and so can be fulfilled or refunded. Cards from before this change do not have it.
  • activity.redemption's status now follows the redemption: fulfilled or refunded by Gleem, by your tool or on Twitch.
  • New event activity.redemption.updated (redemption_id, reward_id, status) on the Stream Manager channel.
  • capabilities.redemptions in GET /api/v1/stream.
  • New error codes reward_not_manageable (403), redemption_not_found (404) and redemption_already_processed (409).

Stream Manager chatters

  • GET /api/v1/stream/{platform}/chatters: who is in chat right now, a page of up to 1,000 at a time with total and cursor. See Chatters.
  • capabilities.chatters in GET /api/v1/stream. It needs the Twitch scope moderator:read:chatters, which the Stream Manager reconnect now asks for; earlier connections list it in missing_scopes until they reconnect.
  • New error code platform_unsupported (422), for a platform that does not offer something the Stream Manager does elsewhere.

Browser-source audio on the IRL Sidekick

  • POST /api/v1/irl/devices/{uuid}/commands takes the audio.* and bluetooth.* commands with a payload: set, update and remove browser sources with their routes and gains, choose where their sound plays, and pair a Bluetooth speaker. See Browser-source audio and Bluetooth.
  • New command audio.test: a short test chime on the IRL Sidekick's speaker and/or into its stream.
  • IRL devices gain audio, the same object, in GET /api/v1/irl/devices and GET /api/v1/irl/devices/{uuid}; null while the device is offline or reports none.
  • The telemetry events on an IRL Sidekick's telemetry channel gain audio: its browser sources (without URLs), outputs and Bluetooth devices. Like interfaces and update, it is left out of an event that would otherwise be too large.

Network addresses behind irl:network

An IRL device's IP addresses locate the streamer's modems, and stream tools need bitrate and link health, not addresses. They now need their own scope. This is the one change in /api/v1 that takes something away: a security fix, not a precedent. See Network addresses.

  • New scope: irl:network, sensitive, on top of irl:read. The consent screen and the token form flag it.
  • The IRL device telemetry channel private-irl-device.<uuid>.telemetry no longer carries addresses: interfaces[].addresses is gone from telemetry events, and remote from the links in ingest.stats. Everything else stays.
  • New channel private-irl-device.<uuid>.network (telemetry_socket.network_channel): the same events in full, for tokens with irl:read and irl:network. See the WebSocket docs.
  • IRL devices gain interfaces (name, kind, state, addresses); addresses is null without irl:network.
  • Tokens Gleem hands to a rented OBS machine can now sign the telemetry channel, since it carries no addresses. They still cannot sign the network channel or see addresses, whatever their scopes.

Stream Manager

The backend of the Gleem IRL app's Stream Manager, open to any tool with the new scopes on an account in the Gleem IRL beta (otherwise 403 feature_unavailable). gleem.gg calls Twitch with your own Twitch sign-in, so the tool never holds a Twitch token; the Stream Manager's Twitch permissions are granted once through reconnect_url, not at sign-in. See Stream Manager and the Stream Manager channel.

  • New scopes: stream:read and stream:write.
  • GET /api/v1/stream: live, viewers, title and category on each platform, what the connection allows, and which Twitch scopes it still lacks.
  • PATCH /api/v1/stream/{platform} and GET …/categories: change the title and category.
  • POST /api/v1/stream/{platform}/chat/messages, DELETE …/chat/messages/{id}, POST …/bans and DELETE …/bans/{user_id}: chat and moderate as the streamer.
  • GET /api/v1/stream/chat and GET /api/v1/stream/activity: the last day's chat and activity.
  • GET and PUT /api/v1/stream/quick-actions: the Gleem IRL app's Quick Actions layout, per account.
  • POST /api/v1/socket/auth signs private-creator.{id}.stream for tokens with stream:read: chat, moderation, follows, subs, gifts, raids, redemptions and Gems, in one platform-neutral shape.

More for the Gleem IRL app

  • GET /api/v1/irl/pair/{code} shows the IRL Sidekick waiting under a pairing code (its hardware, version and when the code expires) so the Gleem IRL app can show it before the creator approves. See Pairing an IRL Sidekick.
  • IRL devices gain version and bitrate (the window the device is set to stream with), and ingest.current_bps: what ingest measured in its latest report, where average_bps is the mean over the whole session.
  • A command sent to a device that goes offline at that very moment answers 409 device_offline instead of a bare 503; a bitrate window is then saved for its next heartbeat.

The Gleem IRL app

Endpoints for the Gleem IRL app, open to any tool with the new scopes. See The Gleem IRL app and OBS rentals.

  • New scopes: irl:write, hosting:read, and hosting:write, which is reserved for starting and ending rentals.
  • POST /api/v1/irl/devices registers a phone as an IRL device and returns its gid_ credential once.
  • POST /api/v1/irl/pair/approve and /decline answer an IRL Sidekick's pairing by the code it shows.
  • POST /api/v1/irl/devices/{uuid}/commands, PUT …/bitrate, PATCH and DELETE /api/v1/irl/devices/{uuid}: remote control, the same as the dashboard.
  • GET /api/v1/hosting/rentals and GET /api/v1/hosting/rentals/{uuid}: the creator's OBS rentals, with their obs-websocket while they run.
  • POST /api/v1/socket/auth signs an IRL device's telemetry channel for tokens with irl:read.
  • IRL devices gain board, hardware, phone and telemetry_socket.
  • Public OAuth apps can register a private-use URI scheme such as gg.gleem.irl:/oauth/callback as a redirect URI (RFC 8252 § 7.1).

General availability

The Developer API is out of preview and open to every creator: the Developer page, personal access tokens, webhooks, OAuth app registration and the consent screen no longer need an invitation. Nothing in /api/v1 changed; tokens and integrations from the preview keep working.

OAuth apps

Third-party tools can now be registered as OAuth apps, so creators connect them with a click instead of pasting a token. See OAuth apps.

  • The authorization code flow with PKCE, the device flow (/activate) and client credentials, at /oauth/authorize, /oauth/token, /oauth/device_authorization and /oauth/revoke, with discovery at /.well-known/oauth-authorization-server.
  • OAuth access tokens (gleem_oat_…) work with every endpoint and the WebSocket, with the same scopes.
  • GET /api/v1/me gains an app object when called with an OAuth token.
  • A 401 for an expired or revoked OAuth token says so in WWW-Authenticate.
  • App webhooks: GET, POST and DELETE /api/v1/webhooks with the new webhooks:write scope.
  • Personal access tokens are unchanged.

Preview

The first version of the Developer API, built together with the Streamer.bot integration.

  • Personal access tokens with scopes, created on the dashboard's Developer page.
  • GET /api/v1/me and POST /api/v1/socket/auth.
  • REST endpoints for the queue, Treats, Gem messages, the leaderboard, memberships and Trigger Tickets, described by an OpenAPI 3.1 spec.
  • Real-time events over the WebSocket: Gem messages, Treat redemptions, queue changes, memberships, post unlocks, follows, Bits exchanges, Trigger Tickets and going live or offline.
  • Signed webhooks with retries, a delivery log and redelivery.
  • login (the Twitch handle) on every viewer object, and total_slots optional when opening a queue.
  • A per-creator message filter for Gem messages and Treat inputs, marked with message_filtered and input_filtered.
  • Test events and a live event log on the Developer page.
  • GET /api/v1/irl/devices and GET /api/v1/irl/devices/{uuid} with the new irl:read scope: Gleem IRL devices and their stream health, for tools such as the OBS IRL Control plugin.