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
Copy file name to clipboardExpand all lines: content/tutorials/instances.markdown
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,12 @@ category: general
4
4
difficulty: medium
5
5
---
6
6
7
-
Instances are parallell "rooms" or "lobbies" of a world.
7
+
Instances are parallel "rooms" or "lobbies" of a world.
8
8
Each instance can only hold a limited number of users, but there is no limit on how many instances can exist of a world.
9
9
Instances are uniquely identified by the combined World ID and Instance ID.
10
10
11
+
*Note: as of 2024-05-02, VRChat indicated in [a Developer Update](https://ask.vrchat.com/t/developer-update-2-may-2024/24284#changes-to-instance-apis-and-auto-creation-13) an eventual intent to replace the current system with a UUID-ish system similar to User IDs*
12
+
11
13
## Instance Generator
12
14
13
15
{{< instance_generator >}}
@@ -37,3 +39,12 @@ USA, West | San José | us
37
39
USA, East | Washington D.C. | use
38
40
Europe | Amsterdam | eu
39
41
Japan | Tokyo | jp
42
+
43
+
### Special Values
44
+
45
+
The VRChat API has several sentinel values for location strings:
46
+
47
+
-`""` Pseudo-null value
48
+
-`"offline"` Implies a user currently is not either running the VRChat client or connected to the Pipeline (e.g., browser tab open)
49
+
-`"traveling"` Indicates a user's client is travelling between instances (e.g., downloading world, synchronizing world state)
50
+
-`"private"` Indicates a user's location is not visible to the currently logged-in user. (e.g., Ask Me/Do Not Disturb status, Invite/Invite+/Group instance)
Copy file name to clipboardExpand all lines: content/tutorials/websocket.markdown
+52-31Lines changed: 52 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,36 @@ It is possible to be connected from multiple locations at the same time. All cli
28
28
> }
29
29
> ```
30
30
31
+
## Note on Enumerations
32
+
33
+
Several JSON string values present in both Websocket API messages and HTTP API responses appear to be contained in predictably consistent sets.
34
+
Throughout both APIs, the empty string `""` is returned in places (including the immediately) where it would seem otherwise reasonable to have a `null` or undefined value.
35
+
In this part of the documentation, the following `":identifier"`s will be used to describe possible enumeration-ish values:
36
+
37
+
- `":locationString"`
38
+
- `""` Pseudo-null value
39
+
- `"offline"` Implies a user currently is not either running the VRChat client or connected to the Pipeline (e.g., browser tab open)
40
+
- `"traveling"` Indicates a user's client is travelling between instances (e.g., downloading world, synchronizing world state)
41
+
- `"private"` Indicates a user's location is not visible to the currently logged-in user. (e.g., Ask Me/Do Not Disturb status, Invite/Invite+/Group instance)
42
+
- *other values* An actual location (see https://vrchatapi.github.io/tutorials/instances/)
43
+
- `":platformString"`
44
+
- `""` Pseudo-null value
45
+
- `"standalonewindows"`
46
+
- `"android"`
47
+
- `"web"` User is on a https://vrchat.com/home page
48
+
- *other values* Some other platform or third-party application (e.g., `"ios"` could be the value for a future build on some Apple devices)
49
+
- `":contentRefreshContentTypeEnum"`
50
+
- `"gallery"`
51
+
- `"icon"`
52
+
- `"emoji"`
53
+
- `"avatar"`
54
+
- `"world"`
55
+
- *other values* Some other user-uploaded content
56
+
- `":contentRefreshActionTypeEnum"`
57
+
- `"created"`
58
+
- `"deleted"`
59
+
- *other values* Not expected
60
+
31
61
## Events
32
62
33
63
### Notification Events
@@ -209,13 +239,13 @@ A "`friend-online`" event is sent when one of the user's friends has gone online
@@ -243,7 +274,8 @@ A "`friend-offline`" event is sent when one of the user's friends has gone offli
243
274
{
244
275
"type": "friend-offline",
245
276
"content": {
246
-
"userId": ":userId"
277
+
"userId": ":userId",
278
+
"platform": ":platformString", // Appears only to be empty "" from these events
247
279
}
248
280
}
249
281
```
@@ -266,22 +298,21 @@ A "`friend-update`" event is sent when something about one of the user's friends
266
298
267
299
268
300
#### friend-location
269
-
A "`friend-location`" event is sent when one of the user's friends has changed instances. Note that the "`world`" field will be an empty object when the friend is on orange/red, or is in a private world.
301
+
A "`friend-location`" event is sent when one of the user's friends has changed instances. Note that the `worldId` field will be `"private"` when the friend is on orange/red, or is in a private world.
270
302
271
303
```json
272
304
{
273
305
"type": "friend-location",
274
306
"content": {
275
307
"userId": ":userId",
308
+
"location": ":locationString",
309
+
"travelingToLocation": ":locationString", // normally empty "", but when the above "location" is "traveling", this contains the imminent destination
@@ -354,8 +385,8 @@ A "`content-refresh`" event is sent when the user adds or removes profile images
354
385
{
355
386
"type": "content-refresh",
356
387
"content": {
357
-
"contentType": ":contentRefreshContentTypeEnum",// One of: "gallery", "icon", "emoji", "avatar", "world", ???
358
-
"actionType": ":contentRefreshActionTypeEnum"// One of: "created", "deleted", ???
388
+
"contentType": ":contentRefreshContentTypeEnum",
389
+
"actionType": ":contentRefreshActionTypeEnum"
359
390
}
360
391
}
361
392
```
@@ -368,7 +399,7 @@ A "`instance-queue-joined`" event is sent when the user queues to join an instan
368
399
{
369
400
"type": "instance-queue-joined",
370
401
"content": {
371
-
"instanceLocation": ":locationString",// Refer to https://vrchatapi.github.io/tutorials/instances/
402
+
"instanceLocation": ":locationString",
372
403
"position": <number> // Integer position in queue
373
404
}
374
405
}
@@ -382,7 +413,7 @@ A "`instance-queue-ready`" event is sent when the user is at the front of the qu
382
413
{
383
414
"type": "instance-queue-ready",
384
415
"content": {
385
-
"instanceLocation": ":locationString",// Refer to https://vrchatapi.github.io/tutorials/instances/
416
+
"instanceLocation": ":locationString",
386
417
"expiry": ":dateTimeString"// Time at which priority will be lost
387
418
}
388
419
}
@@ -419,25 +450,15 @@ A "`group-left`" event is sent when the user has either left a group, or has bee
419
450
420
451
421
452
#### group-member-updated
422
-
A "`group-member-updated`" event is sent when something regarding the user's group membership changes. Note that the `member` object is **not** a full GroupMember object, even though it has similarities. It's missing `user`, `createdAt`, `bannedAt`, and `managerNotes`. It also has the extra `lastPostReadAt` field.
453
+
A "`group-member-updated`" event is sent when something regarding the user's group membership changes. Note that the optional values in the `member` are as if "fetching a specific user", per the schema description.
0 commit comments