> ## Documentation Index
> Fetch the complete documentation index at: https://docs.discord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Embedded App SDK Reference

The Embedded App SDK handles making RPC calls between your application and Discord. It is designed to assist developers in developing interactive Activities like games.

To learn more about building Activities, check out our [Building an Activity](/developers/activities/building-an-activity) tutorial or explore our [Sample Projects](/developers/activities/overview#sample-projects).

***

## Install the SDK

The Embedded App SDK is available via **[npm](https://www.npmjs.com/package/@discord/embedded-app-sdk)** and **[GitHub](https://github.com/discord/embedded-app-sdk)**.

In your frontend JavaScript project directory, install using your package manager of choice.

```
npm install @discord/embedded-app-sdk
```

After installing, you can import and instantiate the SDK in your project.

```javascript theme={"system"}
import { DiscordSDK } from "@discord/embedded-app-sdk";

const discordSdk = new DiscordSDK(DISCORD_CLIENT_ID);
```

***

## SDK Methods

| Name                                                                    | Description                                                             |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [ready](/developers/developer-tools/embedded-app-sdk#ready)             | Resolves when your app has successfully connected to the Discord client |
| [subscribe](/developers/developer-tools/embedded-app-sdk#subscribe)     | Subscribe to an Embedded App SDK Event                                  |
| [unsubscribe](/developers/developer-tools/embedded-app-sdk#unsubscribe) | Unsubscribe to an Embedded App SDK Event                                |
| [close](/developers/developer-tools/embedded-app-sdk#close)             | Close an Embedded App                                                   |

### ready()

Resolves when your app has successfully connected to the Discord client.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  ready(): Promise\<void>
</Monospace>

#### SDK Usage

```js theme={"system"}
async function setup() {
  await discordSdk.ready();
  // The rest of your app logic
}
```

***

### subscribe()

Used to subscribe to a specific event from the list of [SDK Events](/developers/developer-tools/embedded-app-sdk#sdk-events).

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

Depends on the event. Refer to the Required Scopes for the specific event you are subscribing to.

#### Signature

<Monospace>
  subscribe\<Event>(event: [Event](/developers/developer-tools/embedded-app-sdk#sdk-events), listener: (data: EventPayloadData\<Event>) => void, ...subscribeArgs: Partial\<EventPayloadData\<Event>>): Promise\<[EventEmitter](https://nodejs.org/docs/latest/api/events.html)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.subscribe("SDK_EVENT_NAME", eventHandler, args);
```

***

### unsubscribe()

Used to unsubscribe to [SDK Events](/developers/developer-tools/embedded-app-sdk#sdk-events) that your app has already subscribed to.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

*The `EventPayloadData` will vary based on the event you are unsubscribing from. See the specific [event](/developers/developer-tools/embedded-app-sdk#sdk-events) for details.*

<Monospace>
  unsubscribe\<Event>(event: [Event](/developers/developer-tools/embedded-app-sdk#sdk-events), listener: (data: EventPayloadData\<Event>) => void, ...subscribeArgs: Partial\<EventPayloadData\<Event>>): Promise\<[EventEmitter](https://nodejs.org/docs/latest/api/events.html)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.unsubscribe("SDK_EVENT_NAME");
```

***

### close()

Used to close your app with a specified code and reason.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  close(code: [RPCCloseCodes](/developers/developer-tools/embedded-app-sdk#rpcclosecodes), message: string): void
</Monospace>

#### SDK Usage

```js theme={"system"}
discordSdk.close(RPCCloseCodes.CLOSE_NORMAL, "You exited from app");
```

***

## SDK Commands

Developers can use these commands to interact with the Discord client. The following SDK commands are prefixed with `.commands`, such as, `discordSDK.commands.authenticate`.

| Name                                                                                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                |
| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [authenticate](/developers/developer-tools/embedded-app-sdk#authenticate)                                         | Authenticate an existing client with your app                                                                                                                                                                                                                                                                                                                                                                              |
| [authorize](/developers/developer-tools/embedded-app-sdk#authorize)                                               | Authorize a new client with your app                                                                                                                                                                                                                                                                                                                                                                                       |
| [captureLog](/developers/developer-tools/embedded-app-sdk#capturelog)                                             | Forward logs to your own logger                                                                                                                                                                                                                                                                                                                                                                                            |
| [encourageHardwareAcceleration](/developers/developer-tools/embedded-app-sdk#encouragehardwareacceleration)       | Presents a modal dialog to allow enabling of hardware acceleration                                                                                                                                                                                                                                                                                                                                                         |
| [getChannel](/developers/developer-tools/embedded-app-sdk#getchannel)                                             | Returns information about the channel, per the channel\_id                                                                                                                                                                                                                                                                                                                                                                 |
| [getChannelPermissions](/developers/developer-tools/embedded-app-sdk#getchannelpermissions)                       | Returns permissions for the current user in the currently connected channel                                                                                                                                                                                                                                                                                                                                                |
| [getEntitlements](/developers/developer-tools/embedded-app-sdk#getentitlements)                                   | Returns a list of entitlements for the current user                                                                                                                                                                                                                                                                                                                                                                        |
| [getInstanceConnectedParticipants](/developers/developer-tools/embedded-app-sdk#getinstanceconnectedparticipants) | Returns all participants connected to the instance                                                                                                                                                                                                                                                                                                                                                                         |
| [getPlatformBehaviors](/developers/developer-tools/embedded-app-sdk#getplatformbehaviors)                         | Returns information about supported platform behaviors                                                                                                                                                                                                                                                                                                                                                                     |
| [getRelationships](/developers/developer-tools/embedded-app-sdk#getrelationships)                                 | Allows your app to access a user’s Discord Friends list, their pending requests, and blocked users. This scope is part of our Social SDK - [submit for access here](https://discord.com/developers/applications/select/social-sdk/getting-started). [Social SDK Terms apply](https://support-dev.discord.com/hc/en-us/articles/30225844245271-Discord-Social-SDK-Terms), including Section 5(a)(ii) to the data you obtain |
| [getSkus](/developers/developer-tools/embedded-app-sdk#getskus)                                                   | Returns a list of your app's SKUs                                                                                                                                                                                                                                                                                                                                                                                          |
| [initiateImageUpload](/developers/developer-tools/embedded-app-sdk#initiateimageupload)                           | Presents the file upload flow in the Discord client                                                                                                                                                                                                                                                                                                                                                                        |
| [openExternalLink](/developers/developer-tools/embedded-app-sdk#openexternallink)                                 | Allows for opening an external link from within the Discord client                                                                                                                                                                                                                                                                                                                                                         |
| [openInviteDialog](/developers/developer-tools/embedded-app-sdk#openinvitedialog)                                 | Presents a modal dialog with Channel Invite UI without requiring additional OAuth scopes                                                                                                                                                                                                                                                                                                                                   |
| [openShareMomentDialog](/developers/developer-tools/embedded-app-sdk#opensharemomentdialog)                       | Presents a modal dialog to share media to a channel or DM                                                                                                                                                                                                                                                                                                                                                                  |
| [setActivity](/developers/developer-tools/embedded-app-sdk#setactivity)                                           | Modifies how your activity's rich presence is displayed in the Discord client                                                                                                                                                                                                                                                                                                                                              |
| [setConfig](/developers/developer-tools/embedded-app-sdk#setconfig)                                               | Set whether or not the PIP (picture-in-picture) is interactive                                                                                                                                                                                                                                                                                                                                                             |
| [setOrientationLockState](/developers/developer-tools/embedded-app-sdk#setorientationlockstate)                   | Set options for orientation and picture-in-picture (PIP) modes                                                                                                                                                                                                                                                                                                                                                             |
| [shareLink](/developers/developer-tools/embedded-app-sdk#sharelink)                                               | Presents a modal for the user to share a link to your activity with custom query params                                                                                                                                                                                                                                                                                                                                    |
| [startPurchase](/developers/developer-tools/embedded-app-sdk#startpurchase)                                       | Launches the purchase flow for a specific SKU, per the sku\_id                                                                                                                                                                                                                                                                                                                                                             |
| [userSettingsGetLocale](/developers/developer-tools/embedded-app-sdk#usersettingsgetlocale)                       | Returns the current user's locale                                                                                                                                                                                                                                                                                                                                                                                          |

### authenticate()

Authenticate an existing client with your app.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  authenticate(args: [AuthenticateRequest](/developers/developer-tools/embedded-app-sdk#authenticaterequest)): Promise\<[AuthenticateResponse](/developers/developer-tools/embedded-app-sdk#authenticateresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.authenticate({
  access_token: 'ACCESS_TOKEN_STRING'
});
```

***

### authorize()

Authorize a new client with your app.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  authorize(args: [AuthorizeRequest](/developers/developer-tools/embedded-app-sdk#authorizerequest)): Promise\<[AuthorizeResponse](/developers/developer-tools/embedded-app-sdk#authorizeresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.authorize({
  client_id: DISCORD_CLIENT_ID,
  response_type: "code",
  state: "",
  prompt: "none",
  scope: [
    // "applications.builds.upload",
    // "applications.builds.read",
    // "applications.store.update",
    // "applications.entitlements",
    // "bot",
    "identify",
    // "connections",
    // "email",
    // "gdm.join",
    "guilds",
    // "guilds.join",
    // "guilds.members.read",
    // "messages.read",
    // "relationships.read",
    // 'rpc.activities.write',
    // "rpc.notifications.read",
    // "rpc.voice.write",
    // "rpc.voice.read",
    // "webhook.incoming",
  ],
});
```

***

### captureLog()

Forward logs to your own logger.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  captureLog(args: [CaptureLogRequest](/developers/developer-tools/embedded-app-sdk#capturelogrequest)): Promise\<void>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.captureLog({
  level: 'log',
  message: 'This is my log message!'
});
```

***

### encourageHardwareAcceleration()

Presents a modal dialog to allow enabling of hardware acceleration.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ⛔️  | ⛔️      |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  encourageHardwareAcceleration(): Promise\<[EncourageHardwareAccelerationResponse](/developers/developer-tools/embedded-app-sdk#encouragehardwareaccelerationresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.encourageHardwareAcceleration();
```

***

### getChannel()

Returns information about the channel for a provided channel ID.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

* \[guilds] for guild channels
* \[guilds, dm\_channels.read] for GDM channels. dm\_channels.read requires approval from Discord.

#### Signature

<Monospace>
  getChannel(args: [GetChannelRequest](/developers/developer-tools/embedded-app-sdk#getchannelrequest)): Promise\<[GetChannelResponse](/developers/developer-tools/embedded-app-sdk#getchannelresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.getChannel({
  channel_id: discordSdk.channelId,
});
```

***

### getChannelPermissions()

Returns permissions for the current user in the currently connected channel.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

* guilds.members.read

#### Signature

<Monospace>
  getChannelPermissions(): Promise\<[GetChannelPermissionsResponse](/developers/developer-tools/embedded-app-sdk#getchannelpermissionsresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.getChannelPermissions();
```

***

### getEntitlements()

Returns a list of entitlements for the current user.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  getEntitlements(): Promise\<[GetEntitlementsResponse](/developers/developer-tools/embedded-app-sdk#getentitlementsresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.getEntitlements();
```

***

### getInstanceConnectedParticipants()

Returns all participants connected to the instance.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  getInstanceConnectedParticipants(): Promise\<[GetInstanceConnectedParticipantsResponse](/developers/developer-tools/embedded-app-sdk#getinstanceconnectedparticipantsresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.getInstanceConnectedParticipants();
```

***

### getPlatformBehaviors()

Returns information about supported platform behaviors.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  getPlatformBehaviors(): Promise\<[GetPlatformBehaviorsResponse](/developers/developer-tools/embedded-app-sdk#getplatformbehaviorsresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.getPlatformBehaviors();
```

***

### getRelationships()

Returns the current user's relationships.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

* relationships.read

<Info>
  This scope is part of our Social SDK - [submit for access here](https://discord.com/developers/applications/select/social-sdk/getting-started). [Social SDK Terms apply](https://support-dev.discord.com/hc/en-us/articles/30225844245271-Discord-Social-SDK-Terms), including Section 5(a)(ii) to the data you obtain
</Info>

#### Signature

<Monospace>
  getRelationships(): Promise\<[GetRelationshipsResponse](/developers/developer-tools/embedded-app-sdk#getrelationshipsresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.getRelationships();
```

***

### getSkus()

Returns a list of SKU objects. SKUs without prices are automatically filtered out.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  getSkus(): Promise\<[GetSkusResponse](/developers/developer-tools/embedded-app-sdk#getskusresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.getSkus();
```

***

### initiateImageUpload()

Presents the file upload flow in the Discord client.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  initiateImageUpload(): Promise\<[InitiateImageUploadResponse](/developers/developer-tools/embedded-app-sdk#initiateimageuploadresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.initiateImageUpload();
```

***

### openExternalLink()

Allows for opening an external link from within the Discord client.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  openExternalLink(args: [OpenExternalLinkRequest](/developers/developer-tools/embedded-app-sdk#openexternallinkrequest)): Promise\<[OpenExternalLinkResponse](/developers/developer-tools/embedded-app-sdk#openexternallinkresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.openExternalLink({
  url: 'string url'
});
```

***

### openInviteDialog()

Presents a modal dialog with Channel Invite UI without requiring additional OAuth scopes.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  openInviteDialog(): Promise\<void>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.openInviteDialog();
```

***

### openShareMomentDialog()

Presents a modal dialog to share media to a channel or direct message.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ⛔️  | ⛔️      |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  openShareMomentDialog(args: [OpenShareMomentDialogRequest](/developers/developer-tools/embedded-app-sdk#opensharemomentdialogrequest)) Promise\<void>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.openShareMomentDialog({
  mediaUrl: 'DISCORD_CDN_URL'
});
```

***

### setActivity()

Modifies how your Activity's Rich Presence data is displayed in the Discord client. The inner `activity` field is a partial [Activity object](/developers/events/gateway-events#activity-object-activity-structure).

Read the guide on [Using Rich Presence with the Embedded App SDK](/developers/rich-presence/using-with-the-embedded-app-sdk) for more usage details.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

* rpc.activities.write

#### Signature

<Monospace>
  setActivity(args: [SetActivityRequest](/developers/developer-tools/embedded-app-sdk#setactivityrequest)): Promise\<[Activity](/developers/developer-tools/embedded-app-sdk#activity)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.setActivity({
  activity: {
    type: 0,
    details: 'Details',
    state: 'Playing'
  }
});
```

***

### setConfig()

Set whether or not the PIP (picture-in-picture) is interactive.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ⛔️  | ⛔️      |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  setConfig(args: [SetConfigRequest](/developers/developer-tools/embedded-app-sdk#setconfigrequest)): Promise\<[SetConfigResponse](/developers/developer-tools/embedded-app-sdk#setconfigresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.setConfig({
  use_interactive_pip: true
})
```

***

### setOrientationLockState()

Locks the application to specific orientations in each of the supported layout modes.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ⛔️  | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  setOrientationLockState(args: [SetOrientationLockStateRequest](/developers/developer-tools/embedded-app-sdk#setorientationlockstaterequest)): Promise\<void>
</Monospace>

#### Usage

```js theme={"system"}
import {Common} from '@discord/embedded-app-sdk';

await discordSdk.commands.setOrientationLockState({
  lock_state: Common.OrientationLockStateTypeObject.LANDSCAPE,
  picture_in_picture_lock_state: Common.OrientationLockStateTypeObject.LANDSCAPE,
  grid_lock_state: Common.OrientationLockStateTypeObject.UNLOCKED
});
```

***

### shareLink()

Presents the user with a modal to share a link

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  shareLink(args: [ShareLinkRequest](/developers/developer-tools/embedded-app-sdk#sharelinkrequest)): Promise\<[ShareLinkResponse](/developers/developer-tools/embedded-app-sdk#sharelinkresponse)>\<void>
</Monospace>

#### Usage

```js theme={"system"}
const { success } = await discordSdk.commands.shareLink({
  message: 'This message is shared alongside the link!',
  custom_id: 'some_custom_id',
});
success ? console.log('User shared link!') : console.log('User did not share link!');
```

***

### startPurchase()

Launches the purchase flow for a specific SKU ID.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ⛔️  | ⛔️      |

#### Required Scopes

No scopes required

#### Signature

<Monospace>
  startPurchase(args: [StartPurchaseRequest](/developers/developer-tools/embedded-app-sdk#startpurchaserequest)): Promise\<[StartPurchaseResponse](/developers/developer-tools/embedded-app-sdk#startpurchaseresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.startPurchase({sku_id: skuId});
```

***

### userSettingsGetLocale()

Returns the current user's locale.

#### Supported Platforms

| Web | iOS | Android |
| --- | --- | ------- |
| ✅   | ✅   | ✅       |

#### Required Scopes

* identify

#### Signature

<Monospace>
  userSettingsGetLocale(): Promise\<[UserSettingsGetLocaleResponse](/developers/developer-tools/embedded-app-sdk#usersettingsgetlocaleresponse)>
</Monospace>

#### Usage

```js theme={"system"}
await discordSdk.commands.userSettingsGetLocale();
```

***

## SDK Events

Developers may use the following events alongside the `subscribe()` SDK method to subscribe to events from Discord and supported devices.

| Name                                                                                                                        | Description                                                                               |
| --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [READY](/developers/developer-tools/embedded-app-sdk#ready)                                                                 | non-subscription event sent immediately after connecting, contains server information     |
| [ERROR](/developers/developer-tools/embedded-app-sdk#error)                                                                 | non-subscription event sent when there is an error, including command responses           |
| [VOICE\_STATE\_UPDATE](/developers/developer-tools/embedded-app-sdk#voicestateupdate)                                       | sent when a user's voice state changes in a subscribed voice channel (mute, volume, etc.) |
| [SPEAKING\_START](/developers/developer-tools/embedded-app-sdk#speakingstart)                                               | sent when a user in a subscribed voice channel speaks                                     |
| [SPEAKING\_STOP](/developers/developer-tools/embedded-app-sdk#speakingstop)                                                 | sent when a user in a subscribed voice channel stops speaking                             |
| [ACTIVITY\_LAYOUT\_MODE\_UPDATE](/developers/developer-tools/embedded-app-sdk#activitylayoutmodeupdate)                     | Received when a user changes the layout mode in the Discord client                        |
| [ORIENTATION\_UPDATE](/developers/developer-tools/embedded-app-sdk#orientationupdate)                                       | Received when screen orientation changes                                                  |
| [CURRENT\_USER\_UPDATE](/developers/developer-tools/embedded-app-sdk#currentuserupdate)                                     | Received when the current user object changes                                             |
| [CURRENT\_GUILD\_MEMBER\_UPDATE](/developers/developer-tools/embedded-app-sdk#currentguildmemberupdate)                     | Received when the current guild member object changes                                     |
| [THERMAL\_STATE\_UPDATE](/developers/developer-tools/embedded-app-sdk#thermalstateupdate)                                   | Received when Android or iOS thermal states are surfaced to the Discord app               |
| [ACTIVITY\_INSTANCE\_PARTICIPANTS\_UPDATE](/developers/developer-tools/embedded-app-sdk#activityinstanceparticipantsupdate) | Received when the number of instance participants changes                                 |
| [RELATIONSHIP\_UPDATE](/developers/developer-tools/embedded-app-sdk#relationshipupdate)                                     | Received when a relationship of the current user is updated                               |
| [ENTITLEMENT\_CREATE](/developers/developer-tools/embedded-app-sdk#entitlementcreate)                                       | Received when an entitlement is created for a SKU                                         |

### READY

Non-subscription event sent immediately after connecting, contains server information.

#### Required Scopes

No scopes required

#### Sample Event Payload

```javascript theme={"system"}
{
  "v": 1,
  "config": {
      "cdn_host": "cdn.discordapp.com",
      "api_endpoint": "//discord.com/api",
      "environment": "production"
  }
}
```

### ERROR

Non-subscription event sent when there is an error, including command responses.

#### Required Scopes

No scopes required

#### Sample Event Payload

```javascript theme={"system"}
{
  "code": 4006,
  "message": "Not authenticated or invalid scope"
}
```

***

### VOICE\_STATE\_UPDATE

Received when a user's voice state changes in a subscribed voice channel (mute, volume, etc).

#### Required Scopes

* rpc.voice.read

#### Sample Event Payload

```javascript theme={"system"}
{
  "voice_state": {
    "mute": false,
    "deaf": false,
    "self_mute": false,
    "self_deaf": false,
    "suppress": false
  },
  "user": {
    "id": "190320984123768832",
    "username": "test 2",
    "discriminator": "7479",
    "avatar": "b004ec1740a63ca06ae2e14c5cee11f3",
    "bot": false
  },
  "nick": "test user 2",
  "volume": 110,
  "mute": false,
  "pan": {
    "left": 1.0,
    "right": 1.0
  }
}
```

***

### SPEAKING\_START

Received when a user in a subscribed voice channel speaks.

#### Required Scopes

* rpc.voice.read

#### Sample Event Payload

```javascript theme={"system"}
{
  "channel_id": "7173758092142710784",
  "user_id": "7173758143913005056"
}
```

***

### SPEAKING\_STOP

Received when a user in a subscribed voice channel stops speaking.

#### Required Scopes

* rpc.voice.read

#### Sample Event Payload

```javascript theme={"system"}
{
  "channel_id": "7173758211307081728",
  "user_id": "7173758261412237312"
}
```

***

### ACTIVITY\_LAYOUT\_MODE\_UPDATE

Received when a user changes the layout mode in the Discord client.

#### Required Scopes

No scopes required

#### Sample Event Payload

```javascript theme={"system"}
{
  "layout_mode": 1
}
```

***

### ORIENTATION\_UPDATE

Received when screen orientation changes.

#### Required Scopes

No scopes required

#### Sample Event Payload

```javascript theme={"system"}
{
  "screen_orientation": 1
}
```

***

### CURRENT\_USER\_UPDATE

Received when the current user object changes.

#### Required Scopes

* identify

#### Sample Event Payload

```javascript theme={"system"}
{
  "id": "7173771622812225536",
  "username": "beef_supreme",
  "discriminator": "0",
  "global_name": "Dis Cord",
  "avatar": "abcdefg",
  "avatar_decoration_data": {
    "asset": "abcdefg",
    "sku_id": "123456789"
  },
  "bot": false,
  "flags": 1,
  "premium_type": 2
}
```

***

### CURRENT\_GUILD\_MEMBER\_UPDATE

Received when the current guild member object changes.

#### Required Scopes

* identify
* guilds.members.read

#### Sample Event Payload

```javascript theme={"system"}
{
  "user_id": "7173771622812225536",
  "nick": "beef_supreme",
  "guild_id": "613425648685547541"
  "avatar": "abcdefg",
  "avatar_decoration_data": {
    "asset": "abcdefg",
    "sku_id": "123456789"
  },
  "color_string": "#ffff00"
}
```

***

### THERMAL\_STATE\_UPDATE

Received when Android or iOS thermal states are surfaced to the Discord mobile app.

#### Required Scopes

No scopes required

#### Sample Event Payload

```javascript theme={"system"}
{
  thermal_state: 0
}
```

***

### ACTIVITY\_INSTANCE\_PARTICIPANTS\_UPDATE

Received when the number of instance participants changes.

#### Required Scopes

No scopes required

#### Sample Event Payload

```javascript theme={"system"}
{
  "participants": [
    {
      "id": "7173771622812225536",
      "username": "beef_supreme",
      "discriminator": "0",
      "global_name": "Dis Cord",
      "avatar": "abcdefg",
      "avatar_decoration_data": {
        "asset": "abcdefg",
        "sku_id": "123456789"
      },
      "bot": false,
      "flags": 1,
      "premium_type": 2
    }
  ]
}
```

***

### RELATIONSHIP\_UPDATE

Received when a relationship of the current user is updated.

#### Required Scopes

* relationships.read

<Info>
  This scope is part of our Social SDK - [submit for access here](https://discord.com/developers/applications/select/social-sdk/getting-started). [Social SDK Terms apply](https://support-dev.discord.com/hc/en-us/articles/30225844245271-Discord-Social-SDK-Terms), including Section 5(a)(ii) to the data you obtain
</Info>

#### Sample Event Payload

```javascript theme={"system"}
{
  "type": 1,
  "user": {
      "id": "7173771622812225536",
      "username": "beef_supreme",
      "discriminator": "0",
      "global_name": "Dis Cord",
      "avatar": "abcdefg",
      "avatar_decoration_data": {
        "asset": "abcdefg",
        "sku_id": "123456789"
      },
      "bot": false,
      "flags": 1,
      "premium_type": 2
  }
}
```

***

### ENTITLEMENT\_CREATE

<Note>
  Coming soon! Not available during Developer Preview
</Note>

## SDK Interfaces

#### Activity

| Property         | Type                                                                        |
| ---------------- | --------------------------------------------------------------------------- |
| name             | string                                                                      |
| type             | number                                                                      |
| url?             | string \| null                                                              |
| created\_at?     | number \| null                                                              |
| timestamps?      | [Timestamp](/developers/developer-tools/embedded-app-sdk#timestamp) \| null |
| application\_id? | string \| null                                                              |
| details?         | string \| null                                                              |
| details\_url?    | string \| null                                                              |
| state?           | string \| null                                                              |
| state\_url?      | string \| null                                                              |
| emoji?           | [Emoji](/developers/developer-tools/embedded-app-sdk#emoji) \| null         |
| party?           | [Party](/developers/developer-tools/embedded-app-sdk#party) \| null         |
| assets?          | [Assets](/developers/developer-tools/embedded-app-sdk#assets) \| null       |
| secrets?         | [Secrets](/developers/developer-tools/embedded-app-sdk#secrets) \| null     |
| instance?        | boolean \| null                                                             |
| flags?           | number \| null                                                              |

#### Assets

| Property      | Type           |
| ------------- | -------------- |
| large\_image? | string \| null |
| large\_text?  | string \| null |
| large\_url?   | string \| null |
| small\_image? | string \| null |
| small\_text?  | string \| null |
| small\_url?   | string \| null |

#### Application

| Property      | Type           |
| ------------- | -------------- |
| description   | string         |
| icon?         | string \| null |
| id            | string         |
| rpc\_origins? | string\[]      |
| name          | string         |

#### Attachment

| Property   | Type           |
| ---------- | -------------- |
| id         | string         |
| filename   | string         |
| size       | number         |
| url        | string         |
| proxy\_url | string         |
| height?    | number \| null |
| width?     | number \| null |

#### AuthenticateRequest

| Property       | Type           |
| -------------- | -------------- |
| access\_token? | string \| null |

#### AuthenticateResponse

| Property      | Type                                                                    |
| ------------- | ----------------------------------------------------------------------- |
| access\_token | string                                                                  |
| user          | [User](/developers/developer-tools/embedded-app-sdk#user)               |
| scopes        | string\[]                                                               |
| expires       | string                                                                  |
| application   | [Application](/developers/developer-tools/embedded-app-sdk#application) |

#### AuthorizeRequest

| Property                 | Type                                                                       |
| ------------------------ | -------------------------------------------------------------------------- |
| client\_id               | string                                                                     |
| scope                    | [OAuthScopes](/developers/developer-tools/embedded-app-sdk#oauthscopes)\[] |
| response\_type?          | 'code'                                                                     |
| code\_challenge?         | string                                                                     |
| state?                   | string                                                                     |
| prompt?                  | 'none'                                                                     |
| code\_challenge\_method? | 'S256'                                                                     |

#### AuthorizeResponse

| Property | Type   |
| -------- | ------ |
| code     | string |

#### AvatarDecorationData

| Property | Type           |
| -------- | -------------- |
| asset    | string         |
| sku\_id? | string \| null |

#### CaptureLogRequest

| Property | Type                                                                      |
| -------- | ------------------------------------------------------------------------- |
| level    | [ConsoleLevel](/developers/developer-tools/embedded-app-sdk#consolelevel) |
| message  | string                                                                    |

#### ChannelMention

| Property  | Type   |
| --------- | ------ |
| id        | string |
| guild\_id | string |
| type      | number |
| name      | string |

#### Embed

| Property     | Type                                                                                |
| ------------ | ----------------------------------------------------------------------------------- |
| title?       | string \| null                                                                      |
| type?        | string \| null                                                                      |
| description? | string \| null                                                                      |
| url?         | string \| null                                                                      |
| timestamp?   | string \| null                                                                      |
| color?       | number \| null                                                                      |
| footer?      | [EmbedFooter](/developers/developer-tools/embedded-app-sdk#embedfooter) \| null     |
| image?       | Image \| null                                                                       |
| thumbnail?   | Image \| null                                                                       |
| video?       | Video \| null                                                                       |
| provider?    | [EmbedProvider](/developers/developer-tools/embedded-app-sdk#embedprovider) \| null |
| author?      | [EmbedAuthor](/developers/developer-tools/embedded-app-sdk#embedauthor) \| null     |
| fields?      | [EmbedField](/developers/developer-tools/embedded-app-sdk#embedfield)\[] \| null    |

#### EmbedAuthor

| Property          | Type           |
| ----------------- | -------------- |
| name?             | string \| null |
| url?              | string \| null |
| icon\_url?        | string \| null |
| proxy\_icon\_url? | string \| null |

#### EmbedField

| Property | Type    |
| -------- | ------- |
| name     | string  |
| value    | string  |
| inline   | boolean |

#### EmbedFooter

| Property          | Type           |
| ----------------- | -------------- |
| text              | string         |
| icon\_url?        | string \| null |
| proxy\_icon\_url? | string \| null |

#### EmbedProvider

| Property | Type           |
| -------- | -------------- |
| name?    | string \| null |
| url?     | string \| null |

#### Emoji

| Property         | Type                                                              |
| ---------------- | ----------------------------------------------------------------- |
| id               | string                                                            |
| name?            | string \| null                                                    |
| roles?           | string\[] \| null                                                 |
| user?            | [User](/developers/developer-tools/embedded-app-sdk#user) \| null |
| require\_colons? | boolean \| null                                                   |
| managed?         | boolean \| null                                                   |
| animated?        | boolean \| null                                                   |
| available?       | boolean \| null                                                   |

#### EncourageHardwareAccelerationResponse

| Property | Type    |
| -------- | ------- |
| enabled  | boolean |

#### Entitlement

| Property               | Type              |
| ---------------------- | ----------------- |
| id                     | string            |
| sku\_id                | string            |
| application\_id        | string            |
| user\_id               | string            |
| gift\_code\_flags      | number            |
| type                   | string \| number  |
| gifter\_user\_id?      | string \| null    |
| branches?              | string\[] \| null |
| starts\_at?            | string \| null    |
| ends\_at?              | string \| null    |
| parent\_id?            | string \| null    |
| consumed?              | boolean \| null   |
| deleted?               | boolean \| null   |
| gift\_code\_batch\_id? | string \| null    |

#### GetChannelPermissionsResponse

| Property    | Type             |
| ----------- | ---------------- |
| permissions | bigint \| string |

#### GetChannelRequest

| Property    | Type   |
| ----------- | ------ |
| channel\_id | string |

#### GetChannelResponse

| Property      | Type                                                                                  |
| ------------- | ------------------------------------------------------------------------------------- |
| id            | string                                                                                |
| type          | [ChannelTypesObject](/developers/developer-tools/embedded-app-sdk#channeltypesobject) |
| guild\_id?    | string \| null                                                                        |
| name?         | string \| null                                                                        |
| topic?        | string \| null                                                                        |
| bitrate?      | number \| null                                                                        |
| user\_limit?  | number \| null                                                                        |
| position?     | number \| null                                                                        |
| voice\_states | [UserVoiceState](/developers/developer-tools/embedded-app-sdk#uservoicestate)\[]      |
| messages      | [Message](/developers/developer-tools/embedded-app-sdk#message)\[]                    |

#### GetEntitlementsResponse

| Property     | Type                                                                       |
| ------------ | -------------------------------------------------------------------------- |
| entitlements | [Entitlement](/developers/developer-tools/embedded-app-sdk#entitlement)\[] |

#### GetInstanceConnectedParticipantsResponse

| Property     | Type                                                         |
| ------------ | ------------------------------------------------------------ |
| participants | [User](/developers/developer-tools/embedded-app-sdk#user)\[] |

#### GetPlatformBehaviorsResponse

| Property                | Type    |
| ----------------------- | ------- |
| iosKeyboardResizesView? | boolean |

#### GetRelationshipsResponse

| Property      | Type                                                                         |
| ------------- | ---------------------------------------------------------------------------- |
| relationships | [Relationship](/developers/developer-tools/embedded-app-sdk#relationship)\[] |

#### GetSkusResponse

| Property | Type                                                       |
| -------- | ---------------------------------------------------------- |
| skus     | [Sku](/developers/developer-tools/embedded-app-sdk#sku)\[] |

#### GuildMember

| Property   | Type                                                      |
| ---------- | --------------------------------------------------------- |
| user       | [User](/developers/developer-tools/embedded-app-sdk#user) |
| nick?      | string \| null                                            |
| roles      | string\[]                                                 |
| joined\_at | string                                                    |
| deaf       | boolean                                                   |
| mute       | boolean                                                   |

#### GuildMemberRPC

| Property                  | Type                                                                                              |
| ------------------------- | ------------------------------------------------------------------------------------------------- |
| user\_id                  | string                                                                                            |
| nick?                     | string \| null                                                                                    |
| guild\_id                 | string                                                                                            |
| avatar?                   | string \| null                                                                                    |
| avatar\_decoration\_data? | [AvatarDecorationData](/developers/developer-tools/embedded-app-sdk#avatardecorationdata) \| null |
| color\_string?            | string \| null                                                                                    |

#### Image

| Property    | Type           |
| ----------- | -------------- |
| url?        | string \| null |
| proxy\_url? | string \| null |
| height?     | number \| null |
| width?      | number \| null |

#### InitiateImageUploadResponse

| Property   | Type   |
| ---------- | ------ |
| image\_url | string |

#### Message

| Property             | Type                                                                                          |                |
| -------------------- | --------------------------------------------------------------------------------------------- | -------------- |
| id                   | string                                                                                        |                |
| channel\_id          | string                                                                                        |                |
| guild\_id?           | string \| null                                                                                |                |
| author?              | [User](/developers/developer-tools/embedded-app-sdk#user) \| null                             |                |
| member?              | [GuildMember](/developers/developer-tools/embedded-app-sdk#guildmember) \| null               |                |
| content              | string                                                                                        |                |
| timestamp            | string                                                                                        |                |
| edited\_timestamp?   | string \| null                                                                                |                |
| tts                  | boolean                                                                                       |                |
| mention\_everyone    | boolean                                                                                       |                |
| mentions             | [User](/developers/developer-tools/embedded-app-sdk#user)\[]                                  |                |
| mention\_roles       | string\[]                                                                                     |                |
| mention\_channels    | [ChannelMention](/developers/developer-tools/embedded-app-sdk#channelmention)\[]              |                |
| attachments          | [Attachment](/developers/developer-tools/embedded-app-sdk#attachment)\[]                      |                |
| embeds               | [Embed](/developers/developer-tools/embedded-app-sdk#embed)\[]                                |                |
| reactions?           | [Reaction](/developers/developer-tools/embedded-app-sdk#reaction)\[] \| null                  |                |
| nonce?               | string                                                                                        | number \| null |
| pinned               | boolean                                                                                       |                |
| webhook\_id?         | string \| null                                                                                |                |
| type                 | number                                                                                        |                |
| activity?            | [MessageActivity](/developers/developer-tools/embedded-app-sdk#messageactivity) \| null       |                |
| application?         | [MessageApplication](/developers/developer-tools/embedded-app-sdk#messageapplication) \| null |                |
| message\_reference?  | [MessageReference](/developers/developer-tools/embedded-app-sdk#messagereference) \| null     |                |
| flags?               | number                                                                                        |                |
| stickers?            | Sticker\[] \| null                                                                            |                |
| referenced\_message? | [Message](/developers/developer-tools/embedded-app-sdk#message) \| null                       |                |

#### MessageActivity

| Property   | Type           |
| ---------- | -------------- |
| type       | number         |
| party\_id? | string \| null |

#### MessageApplication

| Property      | Type           |
| ------------- | -------------- |
| id            | string         |
| cover\_image? | string \| null |
| description   | string         |
| icon?         | string \| null |
| name          | string         |

#### MessageReference

| Property     | Type           |
| ------------ | -------------- |
| message\_id? | string \| null |
| channel\_id? | string \| null |
| guild\_id?   | string \| null |

#### OpenExternalLinkRequest

| Property | Type   |
| -------- | ------ |
| url      | string |

#### OpenExternalLinkResponse

<Warning>
  `{ opened: null }` is returned on Discord clients before December 2024 that do not report the open link result.
</Warning>

| Property | Type            |
| -------- | --------------- |
| opened   | boolean \| null |

#### OpenShareMomentDialogRequest

| Property | Type   |
| -------- | ------ |
| mediaUrl | string |

#### Party

| Property | Type              |
| -------- | ----------------- |
| id?      | string \| null    |
| size?    | number\[] \| null |

#### Reaction

| Property | Type                                                        |
| -------- | ----------------------------------------------------------- |
| count    | number                                                      |
| me       | boolean                                                     |
| emoji    | [Emoji](/developers/developer-tools/embedded-app-sdk#emoji) |

#### Relationship

| Property | Type                                                                      |
| -------- | ------------------------------------------------------------------------- |
| type     | [number](/developers/developer-tools/embedded-app-sdk#relationship-types) |
| user     | [User](/developers/developer-tools/embedded-app-sdk#user)                 |

#### Secrets

| Property | Type   |
| -------- | ------ |
| join?    | string |
| match?   | string |

#### SetActivityRequest

| Property | Type                                                              |
| -------- | ----------------------------------------------------------------- |
| activity | [Activity](/developers/developer-tools/embedded-app-sdk#activity) |

#### SetConfigRequest

| Property              | Type    |
| --------------------- | ------- |
| use\_interactive\_pip | boolean |

#### SetConfigResponse

| Property              | Type    |
| --------------------- | ------- |
| use\_interactive\_pip | boolean |

#### SetOrientationLockStateRequest

| Property                          | Type                                                                                                |
| --------------------------------- | --------------------------------------------------------------------------------------------------- |
| lock\_state                       | [OrientationLockState](/developers/developer-tools/embedded-app-sdk#orientationlockstatetypeobject) |
| picture\_in\_picture\_lock\_state | [OrientationLockState](/developers/developer-tools/embedded-app-sdk#orientationlockstatetypeobject) |
| grid\_lock\_state                 | [OrientationLockState](/developers/developer-tools/embedded-app-sdk#orientationlockstatetypeobject) |

#### ShareLinkRequest

| Property    | Type   |
| ----------- | ------ |
| custom\_id? | string |
| message     | string |

#### ShareLinkResponse

| Property | Type    |
| -------- | ------- |
| success  | boolean |

#### Sku

| Property        | Type                                                                        |
| --------------- | --------------------------------------------------------------------------- |
| id              | string                                                                      |
| name            | string                                                                      |
| type            | [SkuTypeObject](/developers/developer-tools/embedded-app-sdk#skutypeobject) |
| price           | [SkuPrice](/developers/developer-tools/embedded-app-sdk#skuprice)           |
| application\_id | string                                                                      |
| flags           | number                                                                      |
| release\_date   | string \| null                                                              |

#### SkuPrice

| Property | Type   |
| -------- | ------ |
| amount   | number |
| currency | string |

#### StartPurchaseRequest

| Property | Type   |
| -------- | ------ |
| sku\_id  | string |

#### StartPurchaseResponse

| Value                                                                              |
| ---------------------------------------------------------------------------------- |
| [Entitlement](/developers/developer-tools/embedded-app-sdk#entitlement)\[] \| null |

#### Timestamp

| Property | Type   |
| -------- | ------ |
| start?   | number |
| end?     | number |

#### User

| Property                 | Type                                                                                              |
| ------------------------ | ------------------------------------------------------------------------------------------------- |
| id                       | string                                                                                            |
| username                 | string                                                                                            |
| discriminator            | string                                                                                            |
| global\_name?            | string \| null                                                                                    |
| avatar?                  | string \| null                                                                                    |
| avatar\_decoration\_data | [AvatarDecorationData](/developers/developer-tools/embedded-app-sdk#avatardecorationdata) \| null |
| bot                      | boolean                                                                                           |
| flags?                   | number \| null                                                                                    |
| premium\_type?           | number \| null                                                                                    |

#### UserSettingsGetLocaleResponse

| Property | Type   |
| -------- | ------ |
| locale   | string |

#### UserVoiceState

| Property     | Type                                                                  |
| ------------ | --------------------------------------------------------------------- |
| mute         | boolean                                                               |
| nick         | string                                                                |
| user         | [User](/developers/developer-tools/embedded-app-sdk#user)             |
| voice\_state | [VoiceState](/developers/developer-tools/embedded-app-sdk#voicestate) |
| volume       | number                                                                |

#### Video

| Property | Type           |
| -------- | -------------- |
| url?     | string \| null |
| height?  | number \| null |
| width?   | number \| null |

#### VoiceState

| Property   | Type    |
| ---------- | ------- |
| mute       | boolean |
| deaf       | boolean |
| self\_mute | boolean |
| self\_deaf | boolean |
| suppress   | boolean |

## SDK Enums

#### ChannelTypesObject

| Name                 | Value |
| -------------------- | ----- |
| UNHANDLED            | -1    |
| DM                   | 1     |
| GROUP\_DM            | 3     |
| GUILD\_TEXT          | 0     |
| GUILD\_VOICE         | 2     |
| GUILD\_CATEGORY      | 4     |
| GUILD\_ANNOUNCEMENT  | 5     |
| GUILD\_STORE         | 6     |
| ANNOUNCEMENT\_THREAD | 10    |
| PUBLIC\_THREAD       | 11    |
| PRIVATE\_THREAD      | 12    |
| GUILD\_STAGE\_VOICE  | 13    |
| GUILD\_DIRECTORY     | 14    |
| GUILD\_FORUM         | 15    |

#### ConsoleLevel

| Value   |
| ------- |
| 'error' |
| 'log'   |
| 'warn'  |
| 'debug' |
| 'info'  |

#### OrientationLockStateTypeObject

| Name      | Value |
| --------- | ----- |
| UNHANDLED | -1    |
| UNLOCKED  | 1     |
| PORTRAIT  | 2     |
| LANDSCAPE | 3     |

#### ThermalStateTypeObject

| Name      | Value |
| --------- | ----- |
| UNHANDLED | -1    |
| NOMINAL   | 0     |
| FAIR      | 1     |
| SERIOUS   | 2     |
| CRITICAL  | 3     |

#### OrientationTypeObject

| Name      | Value |
| --------- | ----- |
| UNHANDLED | -1    |
| PORTRAIT  | 0     |
| LANDSCAPE | 1     |

#### LayoutModeTypeObject

| Name      | Value |
| --------- | ----- |
| UNHANDLED | -1    |
| FOCUSED   | 0     |
| PIP       | 1     |
| GRID      | 2     |

#### OAuthScopes

| Value                        |
| ---------------------------- |
| 'bot'                        |
| 'rpc'                        |
| 'identify'                   |
| 'connections'                |
| 'email'                      |
| 'guilds'                     |
| 'guilds.join'                |
| 'guilds.members.read'        |
| 'gdm.join'                   |
| 'messages.read'              |
| 'rpc.notifications.read'     |
| 'rpc.voice.write'            |
| 'rpc.voice.read'             |
| 'rpc.activities.write'       |
| 'webhook.incoming'           |
| 'applications.commands'      |
| 'applications.builds.upload' |
| 'applications.builds.read'   |
| 'applications.store.update'  |
| 'applications.entitlements'  |
| 'relationships.read'         |
| 'activities.read'            |
| 'activities.write'           |
| 'dm\_channels.read'          |

#### RPCCloseCodes

| Name               | Code |
| ------------------ | ---- |
| CLOSE\_NORMAL      | 1000 |
| CLOSE\_UNSUPPORTED | 1003 |
| CLOSE\_ABNORMAL    | 1006 |
| INVALID\_CLIENTID  | 4000 |
| INVALID\_ORIGIN    | 4001 |
| RATELIMITED        | 4002 |
| TOKEN\_REVOKED     | 4003 |
| INVALID\_VERSION   | 4004 |
| INVALID\_ENCODING  | 4005 |

#### SkuTypeObject

| Name         | Value |
| ------------ | ----- |
| UNHANDLED    | -1    |
| APPLICATION  | 1     |
| DLC          | 2     |
| CONSUMABLE   | 3     |
| BUNDLE       | 4     |
| SUBSCRIPTION | 5     |

#### Relationship Types

| Value | Name             | Description                                                                                      |
| ----- | ---------------- | ------------------------------------------------------------------------------------------------ |
| 0     | None             | The user has no relationship with the other user.                                                |
| 1     | Friend           | The user is friends with the other user.                                                         |
| 2     | Blocked          | The current user has blocked the target user.                                                    |
| 3     | Pending Incoming | The current user has received a friend request from the target user, but it is not yet accepted. |
| 4     | Pending Outgoing | The current user has sent a friend request to the target user, but it is not yet accepted.       |
| 5     | Implicit         | The Implicit type is documented for visibility, but should be unused in the SDK.                 |
| 6     | Suggestion       | The Suggestion type is documented for visibility, but should be unused in the SDK.               |
