You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new release of the Discord Social SDK is now available, with the following updates:
9
+
10
+
### Authentication
11
+
- Added an `APPLICATION_DEAUTHORIZED` webhook event which can be configured in the developer portal. When a user unlinks their account or revokes authorization for your application in any way, this event will be sent to configured webhooks. The payload will contain serialized user information. See [Webhook Events](/docs/events/webhook-events) docs for more information on configuring webhook events.
12
+
13
+
### PC
14
+
- Added configurable request timeout SDK HTTP client requests to mitigate crashing when connected to unstable/slow internet. Support is on PC in this release with console and mobile support coming in future release. Timeout default value is 30000ms (30 seconds) and can be configured using the new Client API: [`Client::SetHttpRequestTimeout`]
15
+
16
+
### Mobile
17
+
-[`Client::SetSpeakerMode`] is now deprecated. Unless [`Client::SetEngineManagedAudioSession`] is used, audio routing will be handled automatically by the SDK
18
+
19
+
#### Android
20
+
- Fixed routing of game and voice audio when external audio devices are connected and/or disconnected. [`Client::SetEngineManagedAudioSession`] has been added to communicate that the SDK should not manage audio routing and automatically enter and leave `MODE_IN_COMMUNICATION` when joining and leaving calls.
21
+
- Fixed an issue with the Authorize method when a device configuration change needs to restart the activity
22
+
23
+
#### iOS
24
+
- Various fixes for audio routing and session management. When using the Unity plugin, game audio will no longer stop playing when ending a call. For standalone SDK use, a method [`Client::SetEngineManagedAudioSession`] has been added to communicate that the SDK should not automatically start and stop the `AVAudioSession` when joining and leaving calls.
25
+
- Corrected supported platform values in `Info.plist` for iOS .frameworks.
26
+
27
+
### Consoles
28
+
- Standalone archives now only contain console-specific files, like the Unity and Unreal Engine archives
29
+
30
+
### Misc
31
+
- Fixed a thread safety issue with [`Client::AddLogCallback`]
32
+
- Added [Flags] declaration for bit flags enums in C#
Copy file name to clipboardExpand all lines: docs/discord-social-sdk/getting-started/using-unity.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,8 +51,8 @@ Let's set up your Unity project to include the Social SDK package and add the ne
51
51
52
52
1. Create a new 2D project in Unity Hub using Unity version 2021.3 or later
53
53
2. Either:
54
-
1. Unzip the zip file in the `Packages` folder, or
55
-
2. Unzip the zip file to a temporary location, and [Install Package from Disk](https://docs.unity3d.com/Manual/upm-ui-local.html) from the temporary location.
54
+
1. Unzip the zip file in the Unity `Packages` folder, or
55
+
2. Unzip the zip file and [Install Package from Disk](https://docs.unity3d.com/Manual/upm-ui-local.html). Make sure the folder is in a directory that won't get moved or deleted as your Unity project will load it from that location.
56
56
3. In your project add a `Scripts` folder and create a `DiscordManager.cs` script
|[Application Authorized](/docs/events/webhook-events#application-authorized)|`APPLICATION_AUTHORIZED`| Sent when an app was authorized by a user to a server or their account |
138
-
|[Entitlement Create](/docs/events/webhook-events#entitlement-create)|`ENTITLEMENT_CREATE`| Entitlement was created |
139
-
|[Quest User Enrollment](/docs/events/webhook-events#quest-user-enrollment)|`QUEST_USER_ENROLLMENT`| User was added to a Quest (currently unavailable) |
|[Application Authorized](/docs/events/webhook-events#application-authorized)|`APPLICATION_AUTHORIZED`| Sent when an app was authorized by a user to a server or their account |
138
+
|[Application Deauthorized](/docs/events/webhook-events#application-deauthorized)|`APPLICATION_DEAUTHORIZED`| Sent when an app was deauthorized by a user |
139
+
|[Entitlement Create](/docs/events/webhook-events#entitlement-create)|`ENTITLEMENT_CREATE`| Entitlement was created |
140
+
|[Quest User Enrollment](/docs/events/webhook-events#quest-user-enrollment)|`QUEST_USER_ENROLLMENT`| User was added to a Quest (currently unavailable) |
140
141
141
142
#### Application Authorized
142
143
@@ -175,6 +176,35 @@ The "Value" column corresponds to the event's `type` field value in the [event b
175
176
}
176
177
```
177
178
179
+
#### Application Deauthorized
180
+
181
+
`APPLICATION_DEAUTHORIZED` is sent when the app is deauthorized by a user.
| user |[user object](/docs/resources/user#user-object-user-structure)| User who deauthorized the app |
188
+
189
+
###### Application Deauthorized Example
190
+
191
+
```json
192
+
{
193
+
"version": 1,
194
+
"application_id": "1234560123453231555",
195
+
"type": 1,
196
+
"event": {
197
+
"type": "APPLICATION_DEAUTHORIZED",
198
+
"timestamp": "2024-10-18T14:42:53.064834",
199
+
"data": {
200
+
"user": {
201
+
// user data
202
+
}
203
+
}
204
+
}
205
+
}
206
+
```
207
+
178
208
#### Entitlement Create
179
209
180
210
`ENTITLEMENT_CREATE` is sent when an [entitlement](/docs/resources/entitlement) is created when a user purchases or is otherwise granted one of your app's SKUs. Refer to the [Monetization documentation](/docs/monetization/overview) for details.
| 4001 | Unknown opcode | You sent an invalid [opcode](/docs/topics/opcodes-and-status-codes#voice-voice-opcodes). |
83
-
| 4002 | Failed to decode payload | You sent an invalid payload in your [identifying](/docs/events/gateway-events#identify) to the Gateway. |
84
-
| 4003 | Not authenticated | You sent a payload before [identifying](/docs/events/gateway-events#identify) with the Gateway. |
85
-
| 4004 | Authentication failed | The token you sent in your [identify](/docs/events/gateway-events#identify) payload is incorrect. |
86
-
| 4005 | Already authenticated | You sent more than one [identify](/docs/events/gateway-events#identify) payload. Stahp. |
87
-
| 4006 | Session no longer valid | Your session is no longer valid. |
88
-
| 4009 | Session timeout | Your session has timed out. |
89
-
| 4011 | Server not found | We can't find the server you're trying to connect to. |
90
-
| 4012 | Unknown protocol | We didn't recognize the [protocol](/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. |
91
-
| 4014 | Disconnected | Channel was deleted, you were kicked, voice server changed, or the main gateway session was dropped. Should not reconnect. |
92
-
| 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](/docs/topics/voice-connections#resuming-voice-connection). |
93
-
| 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). |
94
-
| 4020 | Bad request | You sent a malformed request |
| 4001 | Unknown opcode | You sent an invalid [opcode](/docs/topics/opcodes-and-status-codes#voice-voice-opcodes). |
83
+
| 4002 | Failed to decode payload | You sent an invalid payload in your [identifying](/docs/events/gateway-events#identify) to the Gateway. |
84
+
| 4003 | Not authenticated | You sent a payload before [identifying](/docs/events/gateway-events#identify) with the Gateway. |
85
+
| 4004 | Authentication failed | The token you sent in your [identify](/docs/events/gateway-events#identify) payload is incorrect. |
86
+
| 4005 | Already authenticated | You sent more than one [identify](/docs/events/gateway-events#identify) payload. Stahp. |
87
+
| 4006 | Session no longer valid | Your session is no longer valid. |
88
+
| 4009 | Session timeout | Your session has timed out. |
89
+
| 4011 | Server not found | We can't find the server you're trying to connect to. |
90
+
| 4012 | Unknown protocol | We didn't recognize the [protocol](/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. |
91
+
| 4014 | Disconnected | Disconnect individual client (you were kicked, the main gateway session was dropped, etc.). Should not reconnect. |
92
+
| 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](/docs/topics/voice-connections#resuming-voice-connection). |
93
+
| 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). |
94
+
| 4020 | Bad request | You sent a malformed request |
95
+
| 4021 | Disconnected: Rate Limited | Disconnect due to rate limit exceeded. Should not reconnect. |
96
+
| 4022 | Disconnected: Call Terminated | Disconnect all clients due to call terminated (channel deleted, voice server changed, etc.). Should not reconnect. |
0 commit comments