Discord RPC
Discord contains multiple methods of RPC communication to send messages to locally running Discord clients, allowing the remote execution of specific commands to interface with the client. This powers functions you may be familiar with, like clicking an invite link in the browser prompting the locally running Discord client to open with the invite modal.
This page documents the entire RPC protocol. It can be used to help interface with the official Discord client, or as a reference document to implement your own client that supports the RPC protocol.
RPC Protocol Version
The current and only supported version of the RPC protocol is 1.
RPC Transports
RPC supports four different transports:
| Type | Name | Description |
|---|---|---|
| ws | WebSocket | Primarily meant for communicating with the client from the web, limited to trusted partners |
| http | HTTP | Meant for one-off commands that do not require a long-lived connection |
| ipc | IPC | Meant for communicating with the client from local applications, like games or other software running on a user's machine |
| post_message | PostMessage | Used by embedded activities to communicate with the client from within an iFrame |
RPC Scopes
Architecturally, RPC uses the same scopes as OAuth2. The following pseudoscopes below are inherent to the protocol itself, and do not exist as real scopes in the API.
| Value | Description |
|---|---|
| rpc.authenticated | Granted after successfully completing the authentication handshake with the RPC server |
| rpc.local | Granted to any connection to an RPC transport outside of a browser context (i.e. no Origin header) |
| rpc.private | Granted to WebSocket or HTTP transports from a Discord-controlled Origin (i.e. https://discord.com, https://discordapp.com, or one of their subdomains) |
| rpc.private.limited | Granted alongside rpc.private, as well as to HTTP transports utilizing a GET method |
| rpc.embedded_app | Granted to any connection to a PostMessage transport |
RPC Close Codes
Close codes will either be received as a WebSocket close frame or a protocol-level CLOSE opcode. They will be accompanied by a human-friendly message describing the reason for the close.
| Code | Name |
|---|---|
| 1000 | CLOSE_NORMAL |
| 1003 | CLOSE_UNSUPPORTED |
| 1006 | CLOSE_ABNORMAL |
| 4000 | INVALID_CLIENTID |
| 4001 | INVALID_ORIGIN |
| 4002 | RATELIMITED |
| 4003 | TOKEN_REVOKED |
| 4004 | INVALID_VERSION |
| 4005 | INVALID_ENCODING |
RPC Errors
Errors will be dispatched as a ERROR event in response to an outgoing command. They will be accompanied by a human-friendly message describing the error.
| Code | Name |
|---|---|
| 1000 | UNKNOWN_ERROR |
| 1001 | SERVICE_UNAVAILABLE |
| 1002 | TRANSACTION_ABORTED |
| 4000 | INVALID_PAYLOAD |
| 4002 | INVALID_COMMAND |
| 4003 | INVALID_GUILD |
| 4004 | INVALID_EVENT |
| 4005 | INVALID_CHANNEL |
| 4006 | INVALID_PERMISSIONS |
| 4007 | INVALID_CLIENTID |
| 4008 | INVALID_ORIGIN |
| 4009 | INVALID_TOKEN |
| 4010 | INVALID_USER |
| 4011 | INVALID_INVITE |
| 4012 | INVALID_ACTIVITY_JOIN_REQUEST |
| 4015 | INVALID_ENTITLEMENT |
| 4016 | INVALID_GIFT_CODE |
| 4017 | INVALID_GUILD_TEMPLATE |
| 4018 | INVALID_SOUND |
| 4019 | INVALID_PROVIDER |
| 4020 | INVALID_CONNECTION_CALLBACK_STATE |
| 4021 | BAD_REQUEST_FOR_PROVIDER |
| 5000 | OAUTH2_ERROR |
| 5001 | SELECT_CHANNEL_TIMED_OUT |
| 5002 | GET_GUILD_TIMED_OUT |
| 5003 | SELECT_VOICE_FORCE_REQUIRED |
| 5005 | INVALID_ACTIVITY_SECRET |
| 5006 | NO_ELIGIBLE_ACTIVITY |
| 5008 | PURCHASE_CANCELED |
| 5009 | PURCHASE_ERROR |
| 5010 | UNAUTHORIZED_FOR_ACHIEVEMENT |
| 5011 | RATE_LIMITED |
| 5012 | UNAUTHORIZED_FOR_APPLICATION |
| 5013 | NO_CONNECTION_FOUND |
Example RPC Error
{ "code": 4000, "message": "Invalid Client ID"}Rate Limits
The Discord RPC server has a per-client rate limit of 2 connections per minute. This rate limit is raised to 60 connections per minute on Canary clients, as well as clients connecting over the PostMessage transport. Connections exceeding this limit will have a delay before processing.
WebSocket Transport
All Discord clients have an RPC server running that allows control over local Discord clients. The local RPC server runs on localhost (127.0.0.1) and is set up to process WebSocket connections and proxy API requests.
Connecting
For WebSocket connections, the connection is always in the form of ws://127.0.0.1:PORT/. discordapp.io may also be used as it always resolves to localhost.
The port range for Discord's local RPC server is [6463, 6472]. Since the RPC server runs locally, there's a chance it might not be able to obtain its preferred port when it tries to bind to one.
For this reason, the local RPC server will pick one port out of a range of these 10 ports, trying sequentially until it can bind to one. For multiple clients (e.g. Stable and Canary), you might want to add a feature to manually select the port so you can more easily debug.
The below query string parameters should be appended to the connection URL.
Query String Params
| Field | Type | Description |
|---|---|---|
| v | integer | The version of the RPC protocol to use |
| client_id? 1 | string | The ID of the application connecting to the socket |
| encoding? 2 | string | The encoding for packets sent to the client (either json or etf, default json) |
1 Can only be omitted when connecting from a Discord-controlled Origin.
2 ETF encoding may not be supported by all clients. If ETF encoding is requested, outgoing packets must also be sent in the ETF format.
Sending and Receiving Packets
Packets are sent as JSON objects containing the command you want to send to the Discord client. Incoming packets will need to be correctly parsed to obtain the JSON response.
Authentication
Upon connection, the RPC server will validate your provided client_id. If the connection is from a non-Discord-controlled Origin and the client_id is missing, the server will immediately disconnect.
Otherwise, the server will attempt to fetch the client application using the Get RPC Application endpoint. If the application is not found, or the Origin header of the connection does not match one of the application's
rpc_origins values, the server will disconnect. Only if the application is found and the Origin header matches an rpc_origins value will the connection will be accepted.
Upon a successful connection, the server will send a READY event containing some basic user information and configuration data. At this point, you can send an AUTHORIZE command to obtain an OAuth2 code, which can then be exchanged for an access token.
Usage
When connecting from a browser, the WebSocket transport can only be used by Discord itself and a select few trusted partners, as the WebSocket transport allows controlling the client without having software installed on the user's machine.
For example, upon certain events, like clicking an invite link from a browser, Discord will open a WebSocket connection to the local RPC server, sending the INVITE_BROWSER command:
Example Invite Browser Payload
{ "cmd": "INVITE_BROWSER", "args": { "code": "fortnite" }, "nonce": "5c283c7d-524a-4090-b04b-ea0fb023e44c"}Example Invite Browser Response
The local client will receive and use the information from this response to display the invite modal, and respond with:
{ "cmd": "INVITE_BROWSER", "data": { "invite": { "type": 0, "code": "fortnite", "expires_at": null // ... }, "code": "fortnite" }, "evt": null, "nonce": "5c283c7d-524a-4090-b04b-ea0fb023e44c"}HTTP Transport
The HTTP transport is a subset of the WebSocket transport meant for one-off commands that do not require a long-lived connection.
Connecting
The HTTP transport is available on the same port range as the WebSocket transport. The connection URL is in the form of http://127.0.0.1:PORT/rpc.
The below query string parameters still apply.
Query String Params
| Field | Type | Description |
|---|---|---|
| v | integer | The version of the RPC protocol to use |
| client_id? 1 | string | The ID of the application connecting to the socket |
1 Can only be omitted when connecting from a Discord-controlled Origin.
Sending and Receiving Packets
Clients should send a POST request to the connection URL with a JSON body containing the command you want to send. The server will respond with a JSON object containing the response of the command.
An even more limited transport is available via a GET request, where authentication is entirely bypassed, and client_id can be omitted. However, this only grants the rpc.private.limited scope, which only allows a select few commands that don't require authenticated scopes.
For this transport, a JSON-encoded payload query string parameter should be sent alongside the request, containing the same JSON object as the body of a POST request. A callback query string parameter may also be sent, to specify where
the response should redirect to. If the callback is not provided, or does not match the server's origin, the server will use the default marketing URL instead. This is intended for internal use by Discord's web client, and should not be used by third parties.
Authentication
The authentication process for the HTTP transport is the same as the WebSocket transport, with one crucial difference: if no Origin header is present, the rpc_origins check will be bypassed and the connection will be accepted as long as the client_id is valid.
This allows this transport to be used by anyone outside of a browser context.
However, as the HTTP transport can only be used for one-off commands, you will be unable to complete the typical RPC handshake. This limits the use of this transport to only commands that don't require authenticated scopes.
IPC Transport
Similarly, all Discord clients also have an IPC server running that allows control over local Discord clients. By sending packets through the Discord RPC IPC pipe, you can programmatically control your local Discord client, like joining voice channels, retrieving guild or user information, and more.
Connecting
Discord can be on any pipe ranging from discord-ipc-0 to discord-ipc-9. It is a good idea to try and connect to each one and keeping the first one you successfully connect to.
For multiple clients (e.g. Stable and Canary), you might want to add a feature to manually select the pipe so you can more easily debug.
On Windows, the Discord IPC pipe format is \\\\?\\pipe\\discord-ipc-0. On macOS & Linux, it'll be kept in the folder
indicated by the XDG_RUNTIME_DIR, TMPDIR, TMP or TEMP envvars. If none of those exist, use /tmp/.
Sending and Receiving Packets
The IPC protocol has an additional of abstraction over the typical JSON payloads used in the WebSocket transport.
Packets are sent as binary data in a simple format composed of an 8-byte header and payload. The header consists of two 32-bit unsigned integers (little endian) representing the opcode and payload length.
IPC Opcodes
| Value | Name | Description |
|---|---|---|
| 0 | HANDSHAKE | Handshake to be sent immediately after connecting |
| 1 | FRAME | Typical payload for communication with the client |
| 2 | CLOSE | Sent when the Discord client is asking you to leave, or you want to gracefully disconnect |
| 3 | PING | If the Discord client sends this to you, you should reply with a PONG of the same data |
| 4 | PONG | Reply to a PING |
Packet Structure
| Field | Type | Description | Size |
|---|---|---|---|
| Opcode | Unsigned integer (little endian) | Unsigned integer opcode value | 4 bytes |
| Length | Unsigned integer (little endian) | Length of the payload | 4 bytes |
| Payload | Binary data | Format defined by opcode | Variable bytes |
Example Packet
Authentication
After connecting to the IPC socket, you should immediately send a handshake packet to the server. The server will respond with a FRAME packet containing the READY event with some basic user information and configuration data.
Upon successful reception of this event, you can send an AUTHORIZE command to obtain an OAuth2 code, which can then be exchanged for an access token.
Once authenticated, you can call RPC commands on behalf of the user!
Handshake Structure
| Field | Type | Description |
|---|---|---|
| v | integer | The version of the RPC protocol to use |
| client_id | string | The ID of the application connecting to the socket |
Close Structure
| Field | Type | Description |
|---|---|---|
| code | integer | The close code |
| message | string | A human-readable message explaining the closure reason |
PostMessage Transport
The PostMessage transport is meant for embedded activities to communicate with the client from within an iFrame.
Connecting
The PostMessage transport does not require an actual connection, as messages will be sent to the parent window using window.postMessage.
Sending and Receiving Packets
The PostMessage transport uses a similar abstraction layer to the IPC transport.
Packets are sent as an array of two elements, the first being the integer opcode, and the second being the payload object. Opcodes follow the same values as the IPC transport.
Authentication
Similarly to IPC, you should immediately send a handshake message to the parent window after the iFrame loads.
Then, the client will validate that the message is coming from a valid embedded activities origin, typically https://<client_id>.discordsays.com.
The parent window will respond with a READY event containing some basic user information and configuration data.
Upon successful reception of this event, you can send an AUTHORIZE command to obtain an OAuth2 code, which can then be exchanged for an access token.
Once authenticated, you can call RPC commands on behalf of the user!
Handshake Structure
| Field | Type | Description |
|---|---|---|
| v | integer | The version of the RPC protocol to use |
| client_id | string | The ID of the application connecting to the socket |
| frame_id | string | The ID of the current iFrame, provided in the query string of the iFrame's URL |
| sdk_version? | string | The version of the embedded activities SDK being used |
Packet Payloads
Packet payloads are JSON objects containing the command you want to send to the Discord client. Incoming packets will need to be correctly parsed to obtain the JSON response.
Outgoing Payload Structure
| Field | Type | Description |
|---|---|---|
| cmd | string | The command indicating the action of the request |
| args | object | The arguments coinciding with the command of the request |
| nonce | string | A unique identifier given to a command that will be echoed back to you upon a successful send |
| evt? 1 | string | The event the app is subscribing to |
1 Only required when cmd is SUBSCRIBE or UNSUBSCRIBE.
Incoming Payload Structure
| Field | Type | Description |
|---|---|---|
| cmd | string | The echoed command indicating the action of the response |
| data | ?object | The response data of the command |
| nonce | ?string | The unique identifier of the requested command |
| evt 1 | ?string | The event coinciding with the incoming command |
1 Only present in DISPATCH, SUBSCRIBE, and UNSUBSCRIBE events.
RPC User Object
See the user resource for more information.
RPC User Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the user |
| username | string | The user's username, may be unique across the platform |
| discriminator | string | The user's stringified 4-digit Discord tag |
| global_name | ?string | The user's display name |
| avatar | ?string | The user's avatar hash |
| avatar_decoration_data | ?avatar decoration data object | The user's avatar decoration |
| bot | boolean | Whether the user is a bot account |
| flags | integer | The public flags on a user's account |
| premium_type | integer | The type of premium (Nitro) subscription on a user's account |
RPC Guild Object
See the guild resource for more information.
RPC Guild Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the guild |
| name | string | The name of the guild |
| icon_url | ?string | The guild's icon URL |
| vanity_url_code 1 | ?string | The guild's vanity invite code |
1 Only available in Get Guild response.
RPC Guild Member Object
See the guild resource for more information.
RPC Guild Member Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the user this guild member represents |
| nick | ?string | The guild-specific nickname of the member |
| guild_id | snowflake | The ID of the guild the user is in |
| avatar | ?string | The member's guild avatar hash |
| avatar_decoration_data | ?avatar decoration data object | The member's guild avatar decoration |
| banner? | ?string | The member's guild banner hash |
| bio? | ?string | The member's guild-specific bio |
| pronouns? | ?string | The member's guild-specific pronouns |
| color_string? | ?string | The hex-encoded color of the member's name |
Partial RPC Guild Member Structure
| Field | Type | Description |
|---|---|---|
| user | RPC user object | The user this guild member represents |
| nick | ?string | The guild-specific nickname of the member |
| status | string | The status of the user |
| activity | ?activity object | The current activity the user is partaking in |
RPC Channel Object
See the channel resource for more information.
RPC Channel Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the channel |
| name | string | The name of the channel |
| type | integer | The type of channel |
| topic | string | The channel topic |
| bitrate | integer | The bitrate (in bits) of the voice channel |
| user_limit | integer | The user limit of the voice channel (0 refers to no limit) |
| guild_id | ?snowflake | The ID of the guild the channel is in |
| position | integer | Sorting position of the channel |
| messages 1 | array[RPC message object] | The last 50 messages within the channel in ascending order |
| voice_states | array[RPC voice state object] | States of members currently in the voice channel |
1 Only included if the channel or guild's application_id matches the client_id of the connection, or the authorization has the messages.read scope.
Partial RPC Channel Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the channel |
| name | string | The name of the channel |
| type | integer | The type of channel |
RPC Message Object
See the message resource for more information.
RPC Message Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the message |
| blocked? | boolean | Whether the author of the message is blocked by the current user |
| bot? | boolean | Whether the author of the message is a bot account |
| content | string | Contents of the message |
| content_parsed? | array[object] | Parsed contents of the message |
| nick? | string | The displayed nick of the author |
| author_color? | string | The hex-encoded color of the message author's name |
| edited_timestamp | ?ISO8601 timestamp | When this message was last edited |
| timestamp | ISO8601 timestamp | When this message was sent |
| tts | boolean | Whether this message will be read out by TTS |
| mentions | array[RPC user object] | Users specifically mentioned in this message |
| mention_everyone | boolean | Whether this message mentions everyone |
| mention_roles | array[snowflake] | Roles specifically mentioned in this message |
| embeds | array[embed object] | Content embedded in the message |
| attachments | array[attachment object] | The attached files |
| author? | ?RPC user object | The author of the message |
| pinned | boolean | Whether this message is pinned |
| type | integer | The type of message |
RPC Voice State Object
RPC Voice State Structure
| Field | Type | Description |
|---|---|---|
| nick | string | The displayed nick of the user |
| mute | boolean | Whether the user is muted locally |
| volume | float | The local volume of the user |
| pan | pan object | The pan of the user |
| voice_state | RPC remote voice state object | The internal voice state |
| user | RPC user | The user this voice state is for |
RPC Remote Voice State Structure
| Field | Type | Description |
|---|---|---|
| mute | boolean | Whether this user is muted by the guild, if any |
| deaf | boolean | Whether this user is deafened by the guild, if any |
| self_mute | boolean | Whether this user is locally muted |
| self_deaf | boolean | Whether this user is locally deafened |
| suppress | boolean | Whether this user's permission to speak is denied |
Pan Structure
| Field | Type | Description |
|---|---|---|
| left | float | Left pan of user (0-1) |
| right | float | Right pan of user (0-1) |
RPC Relationship Object
RPC Relationship Structure
| Field | Type | Description |
|---|---|---|
| type | integer | The type of relationship |
| user | RPC user object | The target user |
| presence | RPC relationship presence object | The presence of the target user |
RPC Relationship Presence Structure
| Field | Type | Description |
|---|---|---|
| status | string | The status of the user |
| activity | ?activity object | The user's activity associated with the current application |
RPC Voice Settings Object
RPC Voice Settings Structure
| Field | Type | Description |
|---|---|---|
| input | RPC voice IO settings object | The input settings |
| output | RPC voice IO settings object | The output settings |
| mode | RPC voice settings mode object | The voice mode settings |
| automatic_gain_control | boolean | Whether automatic gain control is enabled |
| echo_cancellation | boolean | Whether echo cancellation is enabled |
| noise_suppression | boolean | Whether background noise is being suppressed |
| qos | boolean | Whether voice Quality of Service is enabled |
| silence_warning | boolean | Whether the input warning notice is disabled |
| deaf | boolean | Whether the user is locally deafened |
| mute | boolean | Whether the user is locally muted |
RPC Voice IO Settings Structure
| Field | Type | Description |
|---|---|---|
| available_devices 1 | array[available device object] | The available devices |
| device_id | string | The ID of the primary device |
| volume | float | The input voice level (max 200) |
Available Device Structure
| Field | Type | Description |
|---|---|---|
| id | string | The ID of the device |
| name | string | The name of the device |
RPC Voice Settings Mode Structure
| Field | Type | Description |
|---|---|---|
| type | string | The type of voice settings mode |
| auto_threshold | boolean | Whether the voice activity threshold is automatically set |
| threshold | integer | The threshold (in dB) for voice activity (-100-0) |
| shortcut | array[shortcut key combo object] | The shortcut key combos for PTT |
| delay | integer | The PTT release delay in milliseconds (max 2000) |
RPC Voice Settings Mode Type
| Value | Description |
|---|---|
| PUSH_TO_TALK | Push To Talk |
| VOICE_ACTIVITY | Voice activity |
Shortcut Key Combo Structure
| Field | Type | Description |
|---|---|---|
| type | integer | The type of shortcut key combo |
| code | integer | The code of the shortcut key combo |
| name? 1 | string | The name of the shortcut key combo |
1 This field is always present when received.
Shortcut Key Combo Type
| Value | Name | Description |
|---|---|---|
| 0 | KEYBOARD_KEY | Keyboard key |
| 1 | MOUSE_BUTTON | Mouse button |
| 2 | KEYBOARD_MODIFIER_KEY | Keyboard modifier key |
| 3 | GAMEPAD_BUTTON | Gamepad button |
RPC Guild Template Object
RPC Guild Template Structure
| Field | Type | Description |
|---|---|---|
| code | string | The code of the template (unique ID) |
| state | string | The state of the guild template |
| name | string | The name of the template (1-100 characters) |
| description | string | The description for the template (max 120 characters) |
| creatorId | snowflake | The ID of the user who created the template |
| creator | partial user object | The user who created the template |
| createdAt | ISO8601 timestamp | When this template was created |
| updatedAt | ISO8601 timestamp | When this template was last synced to the source guild |
| sourceGuildId | snowflake | The ID of the guild this template is based on |
| serializedSourceGuild 1 | partial guild object | The guild snapshot this template contains |
| usageCount | integer | Number of times this template has been used |
| isDirty | ?boolean | Whether the template has unsynced changes |
1 This partial guild object is special in that it and the objects within always contain applicable optional fields (even if they're not applicable).
This leads to unexpected behavior, such as available_tags being serialized for voice channels.
Additionally, the main guild object is missing the id field, and all other id fields are not real snowflakes.
RPC Guild Template State
| Value | Description |
|---|---|
| RESOLVING | The guild template is being resolved |
| RESOLVED | The guild template is resolved |
| EXPIRED | The guild template is expired |
| ACCEPTED | The guild template is accepted |
| ACCEPTING | The guild template is being accepted |
Certified Device Object
Certified Device Structure
| Field | Type | Description |
|---|---|---|
| type | string | The type of certified device |
| id | string | The ID of the certified device |
| vendor | certified device vendor object | The vendor of the certified device |
| model | certified device model object | The model of the certified device |
| related? | array[string] | The IDs of other devices related to this device (min 1) |
| echo_cancellation? 1 | boolean | Whether the device's native echo cancellation is enabled |
| noise_suppression? 1 | boolean | Whether the device's native noise suppression is enabled |
| automatic_gain_control? 1 | boolean | Whether the device's automatic gain control is enabled |
| hardware_mute? 1 | boolean | Whether the device is muted hardware-wise |
1 Only applicable if the type is audioinput.
Certified Device Type
| Value | Description |
|---|---|
| audioinput | Microphone |
| audiooutput | Speaker |
| videoinput | Camera |
Certified Device Vendor Structure
| Field | Type | Description |
|---|---|---|
| id | string | The ID of the device vendor |
| name | string | The name of the device vendor |
Certified Device Model Structure
| Field | Type | Description |
|---|---|---|
| id | string | The ID of the device model |
| name | string | The name of the device model |
RPC Activity Participant Object
RPC Activity Participant Object
This structure is a superset of the RPC user object with the following additional fields:
| Field | Type | Description |
|---|---|---|
| nickname? | string | The guild-specific nickname of the member (1-32 characters) |
Orientation State
| Value | Name | Description |
|---|---|---|
| 1 | UNLOCKED | The orientation is unlocked |
| 2 | PORTRAIT | The orientation is in portrait |
| 3 | LANDSCAPE | The orientation is in landscape |
RPC Commands
Commands are the means in which an application can interface with the client.
| Name | Description | Scopes |
|---|---|---|
| DISPATCH | Event dispatch | |
| AUTHORIZE | Used to authorize a new client with your application | |
| AUTHENTICATE | Used to authenticate an existing client with your application | |
| SUBSCRIBE | Used to subscribe to an RPC event | |
| UNSUBSCRIBE | Used to unsubscribe from an RPC event | |
| GET_GUILD | Used to retrieve guild information from the client | rpc |
| GET_GUILDS | Used to retrieve a list of guilds from the client | rpc |
| GET_CHANNEL 1 | Used to retrieve channel information from the client | rpc, guilds, or guilds.channels.read |
| GET_CHANNELS | Used to retrieve a list of channels for a guild from the client | rpc |
| GET_CHANNEL_PERMISSIONS | Used to retrieve the permission settings for the currently connected voice channel | guilds.members.read or guilds.channels.read |
| CREATE_CHANNEL_INVITE | Used to create an invite link for a given channel | rpc |
| GET_RELATIONSHIPS | Used to retrieve the list of relationships with their presences | relationships.read |
| GET_USER | Used to retrieve information about a specific user | rpc.local or rpc.embedded_app |
| SET_USER_VOICE_SETTINGS | Used to change voice settings of users in voice channels | rpc or rpc.voice.write |
| SET_USER_VOICE_SETTINGS_2 | Used to change basic voice settings of users in voice channels | rpc.local |
| PUSH_TO_TALK | Used to enable or disable push-to-talk functionality | rpc and rpc.voice.write |
| SELECT_VOICE_CHANNEL | Used to join or leave a voice channel or private call | rpc |
| GET_SELECTED_VOICE_CHANNEL | Used to get the current voice channel the client is in | rpc or rpc.voice.read |
| SELECT_TEXT_CHANNEL | Used to select a messageable channel | rpc |
| GET_VOICE_SETTINGS | Used to retrieve the client's voice settings | rpc or rpc.voice.read |
| SET_VOICE_SETTINGS | Used to set the client's voice settings | rpc or rpc.voice.write |
| SET_VOICE_SETTINGS_2 | Used to set the client's basic voice settings | rpc.local |
| SET_ACTIVITY 2 | Used to update a user's rich presence | rpc, rpc.activities.write, or rpc.local |
| SEND_ACTIVITY_JOIN_INVITE | Used to send an invite to another user to an activity | rpc or rpc.local |
| CLOSE_ACTIVITY_JOIN_REQUEST | Used to reject a rich presence Ask to Join request | rpc or rpc.local |
| ACTIVITY_INVITE_USER | Used to send an invite to another user for an activity | rpc or rpc.local |
| ACCEPT_ACTIVITY_INVITE | Used to accept an activity invite | rpc or rpc.local |
| OPEN_INVITE_DIALOG | Used to open the invite modal | rpc, rpc.local, or rpc.authenticated |
| OPEN_SHARE_MOMENT_DIALOG | Used to share an image from an embedded activity in recent DMs or channels | rpc.authenticated |
| SHARE_INTERASHARE_LINKCTION | Used to present a modal to user asking where a pre-defined slash command should be ran | rpc.authenticated or rpc.local |
| INITIATE_IMAGE_UPLOAD | Used to open a file dialog and retrieve a user-provided image | rpc, rpc.local, or rpc.authenticated |
| SHARE_LINK | Used to open the share message modal, where a user can pick a channel to send a developer-defined message to | rpc.authenticated |
| DEEP_LINK | Used to navigates to a route in the Discord client | rpc.local or rpc.private |
| CONNECTIONS_CALLBACK | Callback for connections authorization, part of connections flow v2 | rpc.private |
| BILLING_POPUP_BRIDGE_CALLBACK | Callback for payment methods like PaySafeCard, Klarna, Przelewy24, etc | rpc.private |
| GIFT_CODE_BROWSER | Used to open a given gift code link in the client | rpc.private |
| GUILD_TEMPLATE_BROWSER | Used to open a given template link in the client | rpc.private |
| OPEN_MESSAGE | Used to open a specific message or DM in the client | rpc.local |
| OVERLAY | Used by the game overlay to communicate back to the client | rpc.private |
| BROWSER_HANDOFF | Used to signal the end of browser handoff | rpc.private.limited |
| SET_CERTIFIED_DEVICES | Used to send info about certified hardware devices | rpc or rpc.local |
| GET_IMAGE | Used to retrieve a user's profile picture | rpc.local |
| SET_OVERLAY_LOCKED | Used to set whether the process overlay input is locked | rpc.local |
| OPEN_OVERLAY_ACTIVITY_INVITE | Used to open the activity invite modal in the process overlay | rpc.local |
| OPEN_OVERLAY_GUILD_INVITE | Used to open an invite modal in the process overlay | rpc.local |
| OPEN_OVERLAY_VOICE_SETTINGS | Used to open a voice settings modal in the process overlay | rpc.local |
| VALIDATE_APPLICATION | Used to validate the application entitlement | rpc.local |
| GET_ENTITLEMENT_TICKET | Used to retrieve an entitlement ticket | rpc.local |
| GET_APPLICATION_TICKET | Used to retrieve an application ticket | rpc.local |
| START_PURCHASE | Used to retrieve the purchase flow for a specific SKU | rpc.authenticated or rpc.local |
| START_PREMIUM_PURCHASE | Used to initiate a premium subscription purchase | rpc.authenticated or rpc.local |
| GET_SKUS | Used to retrieve a list of purchasable SKUs | rpc.authenticated or rpc.local |
| GET_ENTITLEMENTS | Used to retrieve a list of entitlements for the current user | rpc.authenticated or rpc.local |
| GET_SKUS_EMBEDDED | Used to retrieve a list of purchasable SKUs in an embedded context | rpc.authenticated or rpc.local |
| GET_ENTITLEMENTS_EMBEDDED | Used to retrieve a list of entitlements for the current user in an embedded context | rpc.authenticated or rpc.local |
| GET_NETWORKING_CONFIG (deprecated) | Used by the GameSDK to retrieve a proxy address and networking token | rpc.local |
| NETWORKING_SYSTEM_METRICS (deprecated) | Used by the GameSDK to send networking system metrics | rpc.local |
| NETWORKING_PEER_METRICS (deprecated) | Used by the GameSDK to send networking peer metrics | rpc.local |
| NETWORKING_CREATE_TOKEN (deprecated) | Used by the GameSDK to retrieve a networking token | rpc.local |
| USER_SETTINGS_GET_LOCALE | Used to retrieve the client’s locale | identify |
| SEND_ANALYTICS_EVENT | Used to send an embedded activity analytics event to Discord | |
| OPEN_EXTERNAL_LINK | Used to prompt to open a given URL in the default web browser | rpc.authenticated or rpc.embedded_app |
| CAPTURE_LOG | Used to capture logs into the Discord client devtools | |
| ENCOURAGE_HW_ACCELERATION | Used to open a modal dialog encouraging hardware acceleration | |
| SET_ORIENTATION_LOCK_STATE | Used to set options for orientation and picture-in-picture (PiP) modes | |
| GET_PLATFORM_BEHAVIORS | Used to retrieve platform-specific behaviors | |
| GET_SOUNDBOARD_SOUNDS | Used to retrieve available soundboard sounds | rpc or rpc.local |
| PLAY_SOUNDBOARD_SOUND | Used to play a soundboard sound | rpc and rpc.voice.write |
| TOGGLE_VIDEO | Used to toggle video in a call | rpc and rpc.video.write |
| TOGGLE_SCREENSHARE | Used to toggle screensharing | rpc and rpc.screenshare.write |
| GET_ACTIVITY_INSTANCE_CONNECTED_PARTICIPANTS | Used to retrieve users connected to a specific activity session | rpc.authenticated |
| GET_PROVIDER_ACCESS_TOKEN | Used by the Amazon Music activity to authorize the connection and retrieve the access token | rpc.authenticated |
| MAYBE_GET_PROVIDER_ACCESS_TOKEN | Used by the Amazon Music activity to attempt to get the access token from existing connection | rpc.authenticated |
| NAVIGATE_TO_CONNECTIONS | Used to open the connections page in settings | rpc.authenticated |
| INVITE_USER_EMBEDDED | Used to invite a user to the current embedded activity | relationships.read |
| INVITE_BROWSER | Used to open an invite modal in the client | rpc.private |
| REQUEST_PROXY_TICKET_REFRESH | Used to refresh proxy tickets | rpc.authenticated |
| GET_QUEST_ENROLLMENT_STATUS | Used to retrieve the enrollment status for a quest | identify |
| QUEST_START_TIMER | Used to start the timer for a quest | identify |
1 If retrieving a private channel, also requires the rpc or dm_channels.read scope.
2 Not available from http transport.
Authorize
Used to authorize the current client with your application.
Authorize Arguments Structure
| Field | Type | Description |
|---|---|---|
| client_id | snowflake | The ID of the application |
| response_type? 1 | string | The type of response to return (must be code) |
| redirect_uri? 2 3 | string | The URL to redirect to after authorization; must match one of the registered redirect URIs for the application |
| scopes? | array[string] | A list of scopes to request; may be omitted if the application has a populated integration_types_config |
| code_challenge? | string | A code challenge for the PKCE extension to the authorization code grant; must be used with code_challenge_method |
| code_challenge_method? | string | The method used to generate the code challenge (must be S256); only applicable for the PKCE extension to the authorization code grant |
| state? | string | A unique string to bind the user's request to their authenticated state |
| nonce? | string | A unique string to bind the user's request to their authenticated state; only applicable for authorization code grants with the openid scope |
| permissions? 1 | string | The permissions you're requesting; only applicable when scope contains bot |
| guild_id? | snowflake | The ID of a guild to pre-fill the dropdown picker with; only applicable when scope contains bot, applications.commands, or webhook.incoming and integration_type is GUILD_INSTALL |
| channel_id? | snowflake | The ID of a channel to pre-fill the dropdown picker with; only applicable when scope contains webhook.incoming |
| prompt? | string | The prompt behavior to use for the authorization flow (default consent) |
| disable_guild_select? | boolean | Disallows the user from changing the guild dropdown; only applicable when scope contains bot or applications.commands, or webhook.incoming and integration_type is GUILD_INSTALL (default false) |
| integration_type? | integer | The installation context for the authorization; only applicable when scope contains applications.commands (default GUILD_INSTALL) |
| pid? | integer | The ID of the process to overlay the OAuth2 flow in |
1 Required unless the basic bot authorization flow is used.
2 If a response_type is specified and no redirect_uri is specified, the user will be redirected to the first registered redirect URI for the application.
3 Only applicable if using the ws transport.
Authorize Response Structure
| Field | Type | Description |
|---|---|---|
| code | string | The authorization code to exchange for a token |
Authenticate
Used to authenticate an existing client with your app.
Authenticate Arguments Structure
| Field | Type | Description |
|---|---|---|
| access_token | string | The access token |
Authenticate Response Structure
This structure is a superset of the Get Current Authorization Information response with the following additional fields:
| Field | Type | Description |
|---|---|---|
| access_token | string | The access token |
Subscribe
Used to subscribe to an RPC event. Accepts event subscription arguments. The outer evt field is used as the event name to subscribe to.
Subscribe Response Structure
| Field | Type | Description |
|---|---|---|
| evt | string | The event name |
Unsubscribe
Used to unsubscribe from an RPC event. Accepts event subscription arguments. The outer evt field is used as the event name to unsubscribe from.
Unsubscribe Response Structure
| Field | Type | Description |
|---|---|---|
| evt | string | The event name |
Get Guild
Used to retrieve guild information from the client. Responds with an RPC guild object.
Get Guild Arguments Structure
| Field | Type | Description |
|---|---|---|
| guild_id | snowflake | The ID of the guild |
| timeout | integer | Request timeout in seconds (max 60) |
Get Guilds
Used to retrieve a list of guilds from the client. Responds with a list of RPC guild objects.
Get Channel
Used to retrieve channel information from the client. Responds with an RPC channel object.
Get Channel Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel |
Get Channels
Used to retrieve a list of channels for a guild from the client.
Get Channels Arguments Structure
| Field | Type | Description |
|---|---|---|
| guild_id | snowflake | The ID of the guild |
Get Channels Response Structure
| Field | Type | Description |
|---|---|---|
| channels | array[partial RPC channel object] | Channels in the guild |
Get Channel Permissions
Used to retrieve the permission settings for the currently connected voice channel.
Get Channel Permissions Response Structure
| Field | Type | Description |
|---|---|---|
| permissions | string | Computed permissions for the current user in the connected channel, including overwrites |
Create Channel Invite
Used to create an invite link for a given channel. Responds with a invite object (with invite metadata).
Create Channel Invite Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to create invite for |
Get Relationships
Used to retrieve the friend list and relationship statuses.
Get Relationships Response Structure
| Field | Type | Description |
|---|---|---|
| relationships | array[RPC relationship object] | The relationships |
Get User
Used to retrieve information about a specific user. Responds with an RPC user object or null.
Set User Voice Settings
Used to change voice settings of users in a voice channel. Responds with the resolved settings.
Set User Voice Settings Arguments Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the user |
| pan? | pan object | The pan of the user |
| volume? | integer | The volume percentage (0-200) |
| mute? | boolean | Whether the user is muted |
Set User Voice Settings 2
Used to change voice settings of users in a voice channel. Responds with null.
Set User Voice Settings Arguments Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the user |
| volume? | integer | The volume percentage (0-200) |
| mute? | boolean | Whether the user is muted |
Push To Talk
Used to enable or disable push-to-talk functionality. Responds with null.
Push To Talk Arguments Structure
| Field | Type | Description |
|---|---|---|
| active | boolean | Whether Push To Talk functionality should be active |
Select Voice Channel
Used to join or leave a voice channel, group DM, or DM. Responds with an RPC channel object or null.
Select Voice Channel Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | ?snowflake | The ID of the voice channel to connect to (null to disconnect) |
| timeout? | integer | Request timeout in seconds (max 60) |
| force? | boolean | Whether to forcefully connect to voice channel (default false) |
| navigate? | boolean | Whether to navigate to the voice channel (deafult false) |
Get Selected Voice Channel
Used to get the current voice channel the client is in. Responds with an RPC channel object or null.
Select Text Channel
Used to join or leave a text channel, group DM, or DM. Responds with an RPC channel object or null.
Select Text Channel Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | ?snowflake | The ID of the text channel to navigate to (null to navigate to the "Friends" page) |
| timeout? | integer | Request timeout in seconds (max 60) |
Get Voice Settings
Used to retrieve the client's voice settings. Responds with an RPC voice settings object.
Set Voice Settings
Used to set the client's voice settings. Responds with an RPC voice settings object.
Set Voice Settings Arguments Structure
| Field | Type | Description |
|---|---|---|
| input? | RPC voice IO settings object | The input settings |
| output? | RPC voice IO settings object | The output settings |
| mode? | RPC voice settings mode object | The voice mode settings |
| automatic_gain_control? | boolean | Whether automatic gain control is enabled |
| echo_cancellation? | boolean | Whether echo cancellation is enabled |
| noise_suppression? | boolean | Whether the background noise suppression is enabled |
| qos? | boolean | Whether voice Quality of Service is enabled |
| silence_warning? | boolean | Whether the silence warning notice is displayed |
| deaf? | boolean | Whether the user is locally deafened |
| mute? | boolean | Whether the user is locally muted |
Partial RPC Voice Settings Mode Structure
| Field | Type | Description |
|---|---|---|
| type? | string | The type of voice settings mode |
| auto_threshold? | boolean | Whether the voice activity threshold is automatically set |
| threshold? | integer | The threshold (in dB) for voice activity (-100-0) |
| shortcut? | array[partial shortcut key combo object] | The shortcut key combos for PTT |
| delay? | integer | The PTT release delay in milliseconds (max 2000) |
Set Voice Settings 2
Used to set the client's voice settings. Responds with null.
Set Voice Settings 2 Arguments Structure
| Field | Type | Description |
|---|---|---|
| input_mode? | RPC voice input mode object | The input mode |
| self_mute? | boolean | Whether the user is locally muted |
| self_deaf? | boolean | Whether the user is locally deafened |
RPC Voice Input Mode Structure
| Field | Type | Description |
|---|---|---|
| type | string | The type of voice settings mode |
| shortcut | string | The shortcut key combos for PTT |
Set Activity
Used to update a user's rich presence. Responds with an activity object.
Set Activity Arguments Structure
| Field | Type | Description |
|---|---|---|
| pid? 1 | integer | The ID of the OS process that is sending the presence update request |
| activity | ?RPC activity object | The activity to set |
1 Only required for the ipc transport.
RPC Activity Structure
| Field | Type | Description |
|---|---|---|
| name | string | The name of the activity (1-128 characters) |
| state? | ?string | The user's current party status (2-128 characters) |
| state_url? | ?string | URL that is opened when clicking on the state text (max 256 characters) |
| details? | ?string | What the user is currently doing (2-128 characters) |
| details_url? | ?string | URL that is opened when clicking on the details text (max 256 characters) |
| timestamps? | activity timestamps object | Unix timestamps (in milliseconds) for start and/or end of the game |
| assets? | activity assets object | Images for the presence and their hover texts |
| party? | RPC activity party object | Information for the current party of the user |
| secrets? | activity secrets object | Secrets for rich presence joining and spectating |
| buttons? | array[RPC activity button object] | Custom buttons shown in rich presence (1-2) |
| instance? | boolean | Whether the activity is an instanced game session (a match that will end) |
| supported_platforms? | array[string] | The platforms the activity is supported on (max 10) |
| type | integer | The activity type (except STREAMING, CUSTOM, and HANG) |
| status_display_type? | ?integer | Which field is displayed in the user's status text in the member list |
RPC Activity Party Structure
| Field | Type | Description |
|---|---|---|
| id? | string | The ID of the party (min 2, max 128 characters) |
| size? | array[integer, integer] | The party's current and maximum size (current_size, max_size) |
| privacy? | integer | The privacy of activity party (default PRIVATE) |
Activity Party Privacy
| Value | Name | Description |
|---|---|---|
| 0 | PRIVATE | The party is private |
| 1 | PUBLIC | The party is public |
RPC Activity Button Structure
| Field | Type | Description |
|---|---|---|
| label | string | The label of the custom button (1-32 characters) |
| url | string | URL that is opened when clicking on the button label (1-512 characters) |
Send Activity Join Invite
Used to send an invite to another user for an activity. Responds with null.
Send Activity Join Invite Arguments Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the user to send the activity invite to |
| pid | integer | The ID of the OS process that is sending the activity invite |
Close Activity Join Request
Used to reject a rich presence Ask to Join request. Responds with null.
Close Activity Join Request Arguments Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the user to reject the request from |
Activity Invite User
Used to send an invite to another user for an activity. Responds with null.
Send Activity Join Invite Arguments Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the user to send the activity invite to |
| type | integer | The type of activity request (only JOIN is allowed) |
| content? | string | The message contents (max 1024 characters) |
| pid | integer | The ID of the OS process that is sending the activity invite |
Accept Activity Invite
Used to accept an activity invite. Responds with null.
Accept Activity Invite Arguments Structure
| Field | Type | Description |
|---|---|---|
| type | integer | The type of activity request (only JOIN is allowed) |
| user_id | snowflake | The ID of the user to accept the activity invite from |
| session_id | string | The ID of the Gateway session of the activity invite |
| channel_id | snowflake | The ID of the channel the activity invite message was sent in |
| message_id | snowflake | The ID of the message |
| application_id? | snowflake | The ID of the application |
Open Invite Dialog
Used to present a modal to invite other users to the current embedded activity. Responds with null.
Open Share Moment Dialog
Used to share an image from an embedded activity in recent DMs or channels. Responds with null.
The application must have the EMBEDDED flag.
Open Share Moment Dialog Arguments Structure
| Field | Type | Description |
|---|---|---|
| mediaUrl | string | The Discord CDN URL of the image to share (max 1024) |
Share Interaction
Used by embedded activities to present a modal to user asking where a pre-defined slash command should be ran.
The content, preview_image, and components fields are used within the modal as a command response preview.
Share Interaction Arguments Structure
| Field | Type | Description |
|---|---|---|
| command | string | The name of the application command |
| options? | array[interaction option object] | The pre-defined options for the slash command |
| content? | string | The modal preview's content (max 2000) |
| require_launch_channel? | boolean | Whether to require that the current user should be participating in the embedded activity |
| preview_image? | interaction response preview image object | The modal preview's image |
| components? 1 | array[action row object] | The modal preview's components |
| pid? | integer | The ID of the OS process to overlay the modal in |
1 Only action rows are permitted. Only buttons are permitted inside action rows. The buttons can have only type, style, label, and custom_id. PREMIUM buttons are not permitted. The components can't have id field set.
Interaction Option Structure
| Field | Type | Description |
|---|---|---|
| name | string | The name of the option |
| value | string | The value of the option |
Interaction Response Preview Image Structure
| Field | Type | Description |
|---|---|---|
| height | integer | The height of the image |
| url | string | The URL of the image |
| width | integer | The width of the image |
Share Interaction Response Structure
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the slash command was successfully ran somewhere |
Initiate Image Upload
Used by embedded activities to open a file dialog and retrieve a user-provided image.
Initiate Image Upload Response Structure
| Field | Type | Description |
|---|---|---|
| image_url | string | The Discord CDN URL of the user-provided image |
Share Link
Used to open the share message modal, where a user can pick a channel to send a developer-defined message to.
The application must have the EMBEDDED flag.
Share Link Arguments Structure
| Field | Type | Description |
|---|---|---|
| custom_id? | string | Developer-defined identifier for the link (max 64 characters) |
| message | string | The message's content (max 1000 characters) |
| link_id? | string | The ID of the link (max 64 characters) |
Share Link Response Structure
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the link was successfully shared |
| didCopyLink | boolean | Whether the user copied the link |
| didSendMessage | boolean | Whether the user sent a message |
Deep Link
Used to navigate to a route in the Discord client.
Deep Link Arguments Structure
| Field | Type | Description |
|---|---|---|
| type | string | The type of deep link |
| params | deep link params object | The deep link parameters |
Deep Link Type
| Value | Description |
|---|---|
| USER_SETTINGS | User settings |
| CHANGELOG | Changelog entry |
| LIBRARY | Game library |
| STORE_HOME | Premium subscription home |
| STORE_LISTING | Store listing |
| CHANNEL | Channel |
| GAME_SHOP | Game shop |
| PICK_GUILD_SETTINGS | Guild settings |
| QUEST_HOME | Quest home |
| DISCOVERY_GAME_RESULTS | Game discovery results |
| OAUTH2 | OAuth2 |
| FEATURES | Any path |
| SHOP | Shop |
| ACTIVITIES | Embedded activities |
| QUEST_PREVIEW_TOOL | Quest preview tool |
| ONE_TIME_LOGIN | One time login |
Deep Link Params Structure
| Field | Type | Description | Applicable for |
|---|---|---|---|
| section? | string | The section | USER_SETTINGS, PICK_GUILD_SETTINGS |
| subsection? | string | The subsection | USER_SETTINGS, PICK_GUILD_SETTINGS |
| search? | string | The search query | USER_SETTINGS, PICK_GUILD_SETTINGS, CHANNEL, OAUTH2, SHOP |
| fingerprint? | ?string | The fingerprint | USER_SETTINGS, CHANGELOG, LIBRARY, STORE_HOME, STORE_LISTING, CHANNEL, GAME_SHOP, PICK_GUILD_SETTINGS, QUEST_HOME, DISCOVERY_GAME_RESULTS, ACTIVITIES, QUEST_PREVIEW_TOOL, ONE_TIME_LOGIN |
| date? | string | The changelog entry date | CHANGELOG |
| query? | string | The query | CHANGELOG |
| skuId? | snowflake | The ID of the SKU | STORE_LISTING, GAME_SHOP |
| slug? | string | The slug of the SKU | STORE_LISTING, GAME_SHOP |
| guildId? 1 | snowflake | The ID of the channel guild | CHANNEL, GAME_SHOP |
| channelId? | snowflake | The ID of the channel the message was sent in | CHANNEL |
| messageId? | snowflake | The ID of the message to navigate to | CHANNEL |
| pageIndex? | integer | The page index | GAME_SHOP |
| sort? | string | The field to sort quests by | QUEST_HOME |
| filter? | string | The types to filter quests by | QUEST_HOME |
| tab? | string | The quest home tab (default all) | QUEST_HOME |
| questId? | snowflake | The ID of the quest | QUEST_HOME, QUEST_PREVIEW_TOOL |
| gameId? | snowflake | The ID of the game application | DISCOVERY_GAME_RESULTS |
| token? | string | The authentication token | ONE_TIME_LOGIN |
| path? | string | The path to navigate to | FEATURES |
| attemptId? | string | The ID of the attempt | ACTIVITIES |
| applicationId? | snowflake | The ID of the embedded activity application | ACTIVITIES |
| url? | string | The embedded activity URL | ACTIVITIES |
1 A special value of @me is used to indicate private channels.
Quest Home Sort Type
| suggested | Sort by interest |
|---|---|
| most_recent | Sort by quest creation date |
| expiring_soon | Sort by quest expiration date |
| recently_enrolled | Sort by quest enrollment date |
Quest Home Filter Type
| Value | Description |
|---|---|
| reward_virtual_currency | Quest must have reward of type VIRTUAL_CURRENCY |
| reward_collectible | Quest must have reward of type COLLECTIBLE |
| reward_in_game | Quest must have reward of type REWARD_CODE, or IN_GAME |
| task_play | Quest must have PLAY_ON_DESKTOP, PLAY_ON_DESKTOP_V2, PLAY_ON_XBOX, PLAY_ON_PLAYSTATION, or PLAY_ACTIVITY tasks |
| task_video | Quest must have WATCH_VIDEO, or WATCH_VIDEO_ON_MOBILE tasks |
Quest Home Tab
| Value | Description |
|---|---|
| all | All quests |
| claimed | Claimed quests |
Connections Callback
Used to send the next part of connection flow to the client. Responds with null.
Connections Callback Arguments Structure
| Field | Type | Description |
|---|---|---|
| providerType | string | The type of connection |
| code | string | The authorization code for the connection |
| openid_params? | object | Additional parameters for OpenID Connect |
| iss? | string | The issuer |
| state | string | The state used to authorize the connection |
Billing Popup Bridge Callback
Used as callback for payment methods like PaySafeCard, Klarna, Przelewy24, and other payment providers.
Billing Popup Bridge Callback Arguments Structure
| Field | Type | Description |
|---|---|---|
| state | string | The unique identifier for the request flow |
| path | string | The redirect API path |
| query? | map[string, string] | Redirect query parameters |
| payment_source_type | integer | The type of payment source |
Billing Popup Bridge Callback Response Structure
| Field | Type | Description |
|---|---|---|
| ok | boolean | Whether the HTTP response is successful |
| headers | map[string, string] | The headers of the HTTP response |
| body | ?any | The body of the HTTP response, parsed as JSON |
| text | string | The body of the HTTP response, in text format |
| status | integer | The status of the HTTP response |
Gift Code Browser
Used to open a given gift code link in the client.
Gift Code Browser Arguments Structure
| Field | Type | Description |
|---|---|---|
| code | string | The gift code to open |
Gift Code Browser Response Structure
| Field | Type | Description |
|---|---|---|
| giftCode | gift code object | The gift code |
Guild Template Browser
Used to open a given template link in the client.
Guild Template Browser Arguments Structure
| Field | Type | Description |
|---|---|---|
| code | string | The code of the template |
Guild Template Browser Response Structure
| Field | Type | Description |
|---|---|---|
| guildTemplate | RPC guild template object | The guild template |
| code | string | The code of the template |
Open Message
Used to open a specific message or DM in the client. Responds with null.
Open Message Arguments Structure
| Field | Type | Description |
|---|---|---|
| guild_id? | ?snowflake | The ID of the guild |
| channel_id | snowflake | The ID of the channel |
| message_id | snowflake | The ID of the message |
| pid | integer | The ID of the OS process opening the message (used to open message within overlay) |
Browser Handoff
Used to end browser handoff. Responds with null.
Browser Handoff Arguments Structure
| Field | Type | Description |
|---|---|---|
| handoffToken | string | The handoff token received from the Create Handoff Token endpoint |
| fingerprint | string | The current fingerprint |
Set Certified Devices
Used to send info about certified hardware devices. Responds with null.
Set Certified Devices Arguments Structure
| Field | Type | Description |
|---|---|---|
| devices | array[certified device object] | The certified devices |
Get Image
Used to fetch a user's profile picture.
Get Image Arguments Structure
| Field | Type | Description |
|---|---|---|
| type | string | The type of image |
| id | snowflake | The ID of the user |
| format | string | The format to retrieve image in (only png, webp and jpg are allowed) |
| size | integer | The size of the image to return (if omitted, a default size is used); the size can be any power of two between 16 and 1024 |
Image Type
| Value | Description |
|---|---|
| user | The image is user's avatar |
Get Image Response Structure
| Field | Type | Description |
|---|---|---|
| data_url | string | The image data URI |
Set Overlay Locked
Used to set whether the overlay input is locked. Responds with null.
Set Overlay Locked Arguments Structure
| Field | Type | Description |
|---|---|---|
| locked | boolean | Whether the overlay input should be locked |
| pid | integer | The ID of the OS process where the Discord overlay is running |
Open Overlay Activity Invite
Used to open the activity invite modal in the process' overlay. The activity set via SET_ACTIVITY command must have party and join secret. Responds with null.
Open Overlay Activity Invite Arguments Structure
| Field | Type | Description |
|---|---|---|
| type | integer | The type of activity request (only JOIN is allowed) |
| pid | integer | The ID of the OS process where the Discord overlay is running |
Open Overlay Guild Invite
Used to open the invite modal in the process' overlay.
Open Overlay Guild Invite Arguments Structure
| Field | Type | Description |
|---|---|---|
| code | string | The invite code |
| pid | integer | The ID of the OS process to open the voice settings overlay in |
Open Overlay Voice Settings
Used to open a voice settings modal in the process' overlay.
Open Overlay Voice Settings Arguments Structure
| Field | Type | Description |
|---|---|---|
| pid | integer | The ID of the OS process to open the voice settings overlay in |
Validate Application
Used to validate the application. Responds with null if the user has entitlement for primary application's SKU.
Get Entitlement Ticket
Used to retrieve the entitlement ticket for the current application.
Get Entitlement Ticket Response Structure
| Field | Type | Description |
|---|---|---|
| ticket | string | The ticket |
Get Application Ticket
Used to retrieve the application ticket for the current application.
The ticket usually can be validated client-side with following pseudocode:
Get Application Ticket Response Structure
| Field | Type | Description |
|---|---|---|
| ticket | string | The ticket |
Start Purchase
Used to launch the purchase flow for a specific SKU. Responds with a list of purchased entitlement objects.
Start Purchase Arguments Structure
| Field | Type | Description |
|---|---|---|
| sku_id | snowflake | The ID of the SKU to purchase |
| pid? | integer | The ID of the OS process to overlay the purchase modal in |
Start Premium Purchase
Used to initiate a premium subscription purchase.
Start Premium Purchase Arguments Structure
| Field | Type | Description |
|---|---|---|
| pid? | integer | The ID of the OS process to overlay the purchase modal in |
Get SKUs
Used to retrieve a list of your application's SKUs. Responds with a list of SKU objects.
Get Entitlements
Used to retrieve a list of entitlements for the current user. Responds with a list of entitlement objects.
Get SKUs Embedded
Used to retrieve a list of your application's SKUs in an embedded context.
Get SKUs Embedded Response Structure
| Field | Type | Description |
|---|---|---|
| skus | array[SKU object] | The SKUs of the application |
Get Entitlements Embedded
Used to retrieve a list of entitlements for the current user in an embedded context.
Get Entitlements Embedded Response Structure
| Field | Type | Description |
|---|---|---|
| entitlements | array[entitlement object] | The entitlements for the current user |
Get Networking Config
Used by the GameSDK to retrieve a proxy address and networking token.
Get Networking Config Response Structure
| Field | Type | Description |
|---|---|---|
| address | string | The proxy address |
| token | string | The networking token |
Networking System Metrics
Used by the GameSDK to send networking system metrics. Accepts an object.
Networking Peer Metrics
Used by the GameSDK to send networking peer metrics. Accepts an object.
Networking Create Token
Used by the GameSDK to retrieve a networking token.
Networking Create Token Response Structure
| Field | Type | Description |
|---|---|---|
| address | string | The proxy address |
| token | string | The networking token |
User Settings Get Locale
Used to retrieves the client’s locale.
User Settings Get Locale Response Structure
| Field | Type | Description |
|---|---|---|
| locale | string | The language option chosen by the user |
Send Analytics Event
Used to send an analytics event to Discord via embedded activity. Responds with null.
The application must have the EMBEDDED_FIRST_PARTY flag.
Send Analytics Event Arguments Structure
| Field | Type | Description |
|---|---|---|
| event_name | string | The name of the analytics event |
| event_properties | object | The properties of the analytics event |
Open External Link
Used to prompt to open a given URL in the default web browser. Responds with null.
Open External Link Arguments Structure
| Field | Type | Description |
|---|---|---|
| url | string | The URL to prompt to open |
Capture Log
Used to capture a log entry in the client's console. Responds with null.
Capture Log Arguments Structure
| Field | Type | Description |
|---|---|---|
| level | string | The level of log entry |
| message | string | The message to log |
Log Level
| Value | Description |
|---|---|
| log | Normal |
| warn | Warning |
| debug | Verbose |
| info | Info |
| error | Error |
Encourage HW Acceleration
Used to encourage users to turn on hardware acceleration. Accepts an empty object. Responds with null.
Set Orientation Lock State
Used to set options for orientation and picture-in-picture (PiP) modes. Responds with null.
Set Orientation Lock State Arguments Structure
| Field | Type | Description |
|---|---|---|
| lock_state | integer | The lock state |
| picture_in_picture_lock_state? | ?integer | The PiP lock state |
| grid_lock_state? | ?integer | The grid lock state |
Get Platform Behaviors
Used to retrieve platform-specific behaviors. Response is unstable and subject to change.
Get Platform Behaviors Response Structure
| Field | Type | Description |
|---|---|---|
| iosKeyboardResizesView? | boolean | Whether the keyboard on iOS resizes the view |
Get Soundboard Sounds
Used to retrieve available soundboard sounds. Responds with a list of soundboard sound objects.
Note that default sounds may have their guild_id set to 0.
Play Soundboard Sound
Used to play a soundboard sound. Responds with null.
Play Soundboard Sound Arguments Structure
| Field | Type | Description |
|---|---|---|
| guild_id? | snowflake | The ID of the sound's source guild, if applicable (not required) |
| sound_id? | snowflake | The ID of the soundboard sound to play |
Toggle Video
Used to toggle video in a call. Responds with null.
Toggle Screenshare
Used to toggle screenshare in a call. Responds with null.
If process ID is not provided, this will present a screenshare modal.
Toggle Screenshare Arguments Structure
| Field | Type | Description |
|---|---|---|
| pid? | integer | The ID of the OS process to start screensharing for |
Get Activity Instance Connected Participants
Used to retrieve users connected to a specific activity session.
Get Activity Instance Connected Participants Response Structure
| Field | Type | Description |
|---|---|---|
| participants | array[RPC activity participant object] | The users currently participating in the activity instance |
Get Provider Access Token
Used for the Amazon Music activity to authorize the connection and retrieve the access token. If the user does not have connection for the provider, the Discord client will open a window to link the account to Discord.
Get Provider Access Token Arguments Structure
| Field | Type | Description |
|---|---|---|
| provider | string | The type of connection to authorize |
| connection_redirect? | string | The URL to redirect to |
Get Provider Access Token Response Structure
| Field | Type | Description |
|---|---|---|
| access_token | string | The connection's access token |
Maybe Get Provider Access Token
Used for the Amazon Music activity to attempt to get the access token from existing connection.
Maybe Get Provider Access Token Arguments Structure
| Field | Type | Description |
|---|---|---|
| provider | string | The type of connection to authorize |
Maybe Get Provider Access Token Response Structure
| Field | Type | Description |
|---|---|---|
| access_token | string | The connection's access token |
Navigate To Connections
Used for Amazon Music, opens the connections page in settings. Accepts an empty object. Responds with null.
Invite User Embedded
Used to invite a user to the current embedded activity.
Invite User Embedded Arguments Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the user to send invite to |
| content? | string | The message's content along with activity invite |
Invite Browser
Used to open an invite modal for a guild invite in the client.
Invite Browser Arguments Structure
| Field | Type | Description |
|---|---|---|
| code | string | The code of the invite to open |
Invite Browser Response Structure
| Field | Type | Description |
|---|---|---|
| invite | invite object | The invite |
| code | string | The invite code |
Request Proxy Ticket Refresh
Used to refresh proxy tickets for the current embedded activity.
The application must have the EMBEDDED flag.
Request Proxy Ticket Response Structure
| Field | Type | Description |
|---|---|---|
| ticket | string | The ticket |
Get Quest Enrollment Status
Used to retrieve enrollment status for a quest.
Get Quest Enrollment Status Arguments Structure
| Field | Type | Description |
|---|---|---|
| quest_id | snowflake | The ID of the quest |
Get Quest Enrollment Status Response Structure
| Field | Type | Description |
|---|---|---|
| quest_id | snowflake | The ID of the quest |
| is_enrolled | boolean | Whether the user is accepted the quest |
| enrolled_at | ?ISO8601 timestamp | When the user accepted the quest |
Quest Start Timer
Used to start timer for a quest.
Quest Start Timer Arguments Structure
| Field | Type | Description |
|---|---|---|
| quest_id | snowflake | The ID of the quest |
Quest Start Timer Response Structure
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the timer was successfully started |
RPC Events
Events are payloads sent over the socket to a client that correspond to events in Discord. Many of these mirror actual Gateway events, so check there for more details!
| Name | Description | Scopes |
|---|---|---|
| READY | Non-subscription event sent immediately after connecting, contains server information | |
| ERROR | Non-subscription event sent when there is an error, including command responses | |
| CURRENT_USER_UPDATE | Sent when current user updates | rpc.local, identify |
| CURRENT_GUILD_MEMBER_UPDATE | Sent when current user bound to a guild updates | identify and guilds.members.read |
| GUILD_STATUS | Sent when a subscribed guild's state changes | rpc |
| GUILD_CREATE | Sent when a guild is created/joined on the client | rpc |
| CHANNEL_CREATE | Sent when a channel is created/joined on the client | rpc |
| RELATIONSHIP_UPDATE | Sent when a user's relationship updates | relationships.read |
| VOICE_CHANNEL_SELECT | Sent when the client moves voice channels | rpc |
| VOICE_STATE_CREATE | Sent when a user joins a subscribed voice channel | rpc or rpc.voice.read |
| VOICE_STATE_DELETE | Sent when a user parts a subscribed voice channel | rpc or rpc.voice.read |
| VOICE_STATE_UPDATE | Sent when a user's voice state changes in a subscribed voice channel (mute, volume, etc.) | rpc or rpc.voice.read |
| VOICE_SETTINGS_UPDATE | Sent when the client's voice settings update | rpc or rpc.voice.read |
| VOICE_SETTINGS_UPDATE_2 | Same when the client's basic voice settings update | rpc.local |
| VOICE_CONNECTION_STATUS | Sent when the client's voice connection status changes | rpc or rpc.voice.read |
| SPEAKING_START | Sent when a user in a subscribed voice channel speaks | rpc, rpc.voice.read, or rpc.local |
| SPEAKING_STOP | Sent when a user in a subscribed voice channel stops speaking | rpc, rpc.voice.read, or rpc.local |
| ACTIVITY_JOIN | Sent when the user clicks a rich presence join invite in chat to join an activity | rpc, rpc.authenticated, or rpc.local |
| ACTIVITY_JOIN_REQUEST | Sent when the user receives a rich presence Ask to Join request | rpc or rpc.local |
| ACTIVITY_SPECTATE | Sent when the user clicks a rich presence spectate invite in chat to spectate a game | rpc, rpc.authenticated, or rpc.local |
| ACTIVITY_INVITE | Sent when the user receives a rich presence Join request | rpc or rpc.local |
| ACTIVITY_PIP_MODE_UPDATE | Sent when PiP (Picture-in-Picture) mode changes | |
| ACTIVITY_LAYOUT_MODE_UPDATE | Sent when a user changes the layout mode in the Discord client | |
| THERMAL_STATE_UPDATE | Sent when thermal state of the mobile device is updated | rpc.authenticated |
| ORIENTATION_UPDATE | For mobile devices, indicates a change in orientation of the screen | rpc.authenticated |
| ACTIVITY_INSTANCE_PARTICIPANTS_UPDATE | Sent when the number of instance participants changes | rpc.authenticated |
| NOTIFICATION_CREATE | Sent when the client receives a notification (mention or new message in eligible channels) | rpc and rpc.notifications.read |
| MESSAGE_CREATE 1 | Sent when a message is created in a subscribed text channel | rpc |
| MESSAGE_UPDATE 1 | Sent when a message is updated in a subscribed text channel | rpc |
| MESSAGE_DELETE 1 | Sent when a message is deleted in a subscribed text channel | rpc |
| OVERLAY | Sent to communicate with the game overlay | rpc.private |
| OVERLAY_UPDATE | Sent when the game overlay settings are changed for your application | rpc.local |
| ENTITLEMENT_CREATE | Sent when an entitlement is created for one of your application's SKUs | rpc.authenticated, rpc.local |
| ENTITLEMENT_DELETE | Sent when an entitlement is deleted for one of your application's SKUs | rpc.authenticated, rpc.local |
| SCREENSHARE_STATE_UPDATE | Sent when a user's screenshare state changes | rpc.screenshare.read or rpc.local |
| VIDEO_STATE_UPDATE | Sent when a user's video state changes | rpc.voice.read or rpc.local |
| AUTHORIZE_REQUEST | Sent when an activity wants to authorize within the Discord client | |
| QUEST_ENROLLMENT_STATUS_UPDATE | Sent when a user's quest enrollment status changes | identify |
1 Requires that the channel or guild's application_id matches the client_id of the connection, or the authorization has the messages.read scope.
Ready
Sent when the client has completed the initial handshake with the RPC server.
Ready Structure
| Field | Type | Description |
|---|---|---|
| v | integer | The RPC protocol version |
| config | client environment config object | The client environment configuration |
| user? 1 | RPC user object | The connected user |
1 Only present in the IPC transport.
Client Environment Config Structure
| Field | Type | Description |
|---|---|---|
| cdn_host? | string | The CDN domain |
| api_endpoint | string | The base API URL without scheme |
| environment | string | The type of environment (always production) |
Error
Sent in response to outgoing command or event.
Error Structure
| Field | Type | Description |
|---|---|---|
| code | integer | The error code |
| message | string | A human-readable message describing the error |
Current User Update
Sent when properties about the current user change. Inner payload is an RPC user object.
Current Guild Member Update
Sent when properties about the guild member change. Inner payload is an RPC guild member object.
Current Guild Member Update Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| guild_id | snowflake | The ID of the guild |
Guild Status
Sent when a subscribed guild's state changes.
Guild Status Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| guild_id | snowflake | The ID of the guild |
Guild Status Structure
| Field | Type | Description |
|---|---|---|
| guild | RPC guild object | The guild |
Guild Create
Sent when a guild is created/joined on the client. The inner payload is an RPC guild object.
Channel Create
Sent when a channel is created/joined on the client. The inner payload is a partial RPC channel object.
Relationship Update
Sent when a user's relationship updates. The inner payload is an RPC relationship object.
Voice Channel Select
Sent when the client moves voice channels.
Voice Channel Select Structure
| Field | Type | Description |
|---|---|---|
| channel_id | ?snowflake | The ID of the channel |
| guild_id? | ?snowflake | The ID of the guild the channel is in |
Voice State Create
Sent when a user joins a subscribed voice channel. The inner payload is an RPC voice state object.
Voice State Create Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to subscribe to/unsubscribe from |
Voice State Delete
Sent when a user parts a subscribed voice channel. The inner payload is an RPC voice state object.
Voice State Delete Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to subscribe to/unsubscribe from |
Voice State Update
Sent when a user's voice state changes in a subscribed voice channel (mute, volume, etc.). The inner payload is an RPC voice state object.
Voice State Update Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to subscribe to/unsubscribe from |
Voice Settings Update
Sent when the client's voice settings update. The inner payload is an RPC voice settings object.
Voice Settings Update 2
Sent when the client's user voice settings update.
Voice Settings Update 2 Structure
| Field | Type | Description |
|---|---|---|
| input_mode | RPC voice input mode object | The input mode |
| local_mutes | array[snowflake] | The IDs of the users that are locally muted |
| local_volumes | map[snowflake, float] | A mapping of user IDs to their volume |
| self_mute | boolean | Whether the user is self-muted |
| self_deaf | boolean | Whether the user is self-deafened |
RPC Voice Input Mode Structure
| Field | Type | Description |
|---|---|---|
| type | string | The type of voice settings mode |
| shortcut | string | The shortcut key combos for PTT |
Voice Connection Status
Sent when the client's voice connection status changes.
Voice Connection Status Structure
| Field | Type | Description |
|---|---|---|
| state | string | The state of voice connection |
| hostname | string | The host name of the voice server |
| pings | array[voice connection ping object] | The latest pings (max 200) |
| average_ping? | integer | The average latency in milliseconds |
| last_ping? | integer | The current latency in milliseconds |
Voice Connection Ping Structure
| Field | Type | Description |
|---|---|---|
| time | integer | Unix timestamp in milliseconds when the ping was made |
| value | integer | The latency |
Voice Connection State
| Value | Description |
|---|---|
| DISCONNECTED | Voice server is disconnected |
| AWAITING_ENDPOINT | Client is waiting for a voice endpoint |
| AUTHENTICATING | Discord has connected to your real-time communication server and will secure the connection |
| CONNECTING | RTC server has been allocated and Discord is attempting to connect to it |
| VOICE_DISCONNECTED | Connection has been interrupted (Discord will attempt to re-establish the connection in a moment) |
| VOICE_CONNECTING | Secure connection to server is established and attempting to send data |
| VOICE_CONNECTED | Connection is successfully established |
| NO_ROUTE | Connection cannot be established (Discord will try again in a moment) |
| ICE_CHECKING | Secure connection to server is established and attempting to send data |
| DTLS_CONNECTING | Secure connection to server is established and attempting to send data |
Speaking Start
Sent when a user in a subscribed voice channel speaks.
Speaking Start Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | ?snowflake | The ID of the channel |
Speaking Start Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel |
| user_id | snowflake | The ID of the user that started speaking |
Speaking Stop
Sent when a user in a subscribed voice channel stops speaking.
Speaking Stop Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | ?snowflake | The ID of the channel |
Speaking Stop Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel |
| user_id | snowflake | The ID of the user that stopped speaking |
Activity Join
Sent when the user clicks a rich presence join invite in chat to join an activity.
Activity Join Structure
| Field | Type | Description |
|---|---|---|
| secret | string | The join secret |
| intent? | integer | The activity join intent |
Join Intent
| Value | Name | Description |
|---|---|---|
| 0 | PLAY | Join |
| 1 | SPECTATE | Spectate |
Activity Join Request
Sent when the user receives a rich presence Ask to Join request.
Activity Join Request Structure
| Field | Type | Description |
|---|---|---|
| user | RPC user object | The user |
| activity | activity object | The activity |
| type | integer | The type of activity request (always JOIN_REQUEST) |
| channel_id | snowflake | The ID of the channel |
| message_id | snowflake | The ID of the message |
Activity Spectate
Sent when the user clicks a rich presence spectate invite in chat to spectate a game.
Activity Spectate Structure
| Field | Type | Description |
|---|---|---|
| secret | string | The spectating secret |
Activity Invite
Sent when the user receives a rich presence Join request.
Activity Invite Structure
| Field | Type | Description |
|---|---|---|
| user | RPC user object | The user |
| activity | activity object | The activity |
| type | integer | The type of activity request (always JOIN) |
| channel_id | snowflake | The ID of the channel |
| message_id | snowflake | The ID of the message |
Activity PiP Mode Update
Sent when PiP (Picture-in-Picture) mode changes. This is essentially equivalent to Activity Layout Mode Update and checking if layout mode is not FOCUSED.
Activity PiP Mode Update
| Field | Type | Description |
|---|---|---|
| is_pip_mode | boolean | Whether the embedded activity is in PiP mode |
Activity Layout Mode Update
Sent when a user changes the layout mode in the Discord client.
Activity Layout Mode Update Structure
| Field | Type | Description |
|---|---|---|
| layout_mode | integer | The current layout mode |
Layout Mode
| Value | Name | Description |
|---|---|---|
| 0 | FOCUSED | Embedded activity is in focus |
| 1 | PIP | Embedded activity is in PiP mode |
| 2 | GRID | Embedded activity is in a grid |
Thermal State Update
Sent when thermal state of mobile device is updated.
Thermal State Update Structure
| Field | Type | Description |
|---|---|---|
| thermal_state | integer | The thermal state |
Thermal State
| Value | Name | Description |
|---|---|---|
| 0 | NOMINAL | Nominal |
| 1 | FAIR | Fair |
| 2 | SERIOUS | Serious |
| 3 | CRITICAL | Critical |
Orientation Update
Sent when orientation of the screen changes.
Orientation Update Structure
| Field | Type | Description |
|---|---|---|
| screen_orientation | integer | The current screen orientation |
Activity Instance Participants Update
Sent when someone joins/leaves embedded activity instance.
Activity Instance Participants Update Structure
| Field | Type | Description |
|---|---|---|
| participants | array[RPC activity participant object] | The users currently participating in the activity instance |
Notification Create
Sent when the client receives a notification (mention or new message in eligible channels).
Notification Create Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel the message was sent in |
| message | RPC message object | The message that triggered the notification |
| icon_url | ?string | The URL of the icon to display |
| title | string | The title of the notification |
| body | string | The body text of the notification |
Message Create
Sent when a message is created in a subscribed text channel.
Message Create Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to subscribe to/unsubscribe from |
Message Create Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to subscribe to/unsubscribe from |
| message | RPC message object | The message |
Message Update
Sent when a message is updated in a subscribed text channel.
Message Update Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to subscribe to/unsubscribe from |
Message Update Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to subscribe to/unsubscribe from |
| message | RPC message object | The message |
Message Delete
Sent when a message is deleted in a subscribed text channel.
Message Delete Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to subscribe to/unsubscribe from |
Message Delete Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel to subscribe to/unsubscribe from |
| message | partial RPC message object | The deleted message |
Partial RPC Message Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the deleted message |
Overlay Update
Sent when the game overlay settings are changed for your application.
Overlay Update Subscription Arguments Structure
| Field | Type | Description |
|---|---|---|
| pid | integer | The ID of the process to subscribe to/unsubscribe from |
Overlay Update Structure
| Field | Type | Description |
|---|---|---|
| enabled | boolean | Whether the overlay is enabled for the application |
| locked | boolean | Whether the overlay is locked in the subscribed process |
Entitlement Create
Sent when an entitlement is created when a user purchases or is otherwise granted one of your application's SKUs. The inner payload is an entitlement object.
Entitlement Delete
Sent when an entitlement is deleted. The inner payload is an entitlement object.
Screenshare State Update
Sent when a user's screenshare state changes.
Screenshare State Update Structure
| Field | Type | Description |
|---|---|---|
| active | boolean | Whether the user is screensharing |
| pid | ?integer | The ID of the OS process whose window is being screenshared |
| application | ?screenshare application object | The application being screenshared |
Screenshare Application Structure
| Field | Type | Description |
|---|---|---|
| name | string | The name of the application |
Video State Update
Sent when a user's video state changes.
Video State Update Structure
| Field | Type | Description |
|---|---|---|
| active | boolean | Whether the current user's camera is enabled |
Authorize Request
Sent when an activity wants to authorize within the Discord client. Inner payload is null.
Quest Enrollment Status Update
Sent when a user's quest enrollment status changes.
Quest Enrollment Status Update Structure
| Field | Type | Description |
|---|---|---|
| quest_id | snowflake | The ID of the quest |
| is_enrolled | boolean | Whether the user is accepted the quest |
| enrolled_at | ?ISO8601 timestamp | When the user accepted the quest |