Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions openapi/components/codeSamples/authentication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
-H "Content-Type: application/json" \
-b "auth={authCookie}" \
--data '{"code": "string"}'
/auth/user/twofactorauth/otp:
get:
- lang: cURL
source: >-
curl -X GET "https://api.vrchat.cloud/api/1/auth/user/twofactorauth/otp" \
-H "Content-Type: application/json" \
-b "auth={authCookie}"
/auth/twofactorauth/otp/verify:
post:
- lang: cURL
Expand Down
2 changes: 2 additions & 0 deletions openapi/components/paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
$ref: "./paths/authentication.yaml#/paths/~1auth~1user"
"/auth/twofactorauth/totp/verify":
$ref: "./paths/authentication.yaml#/paths/~1auth~1twofactorauth~1totp~1verify"
"/auth/user/twofactorauth/otp":
$ref: "./paths/authentication.yaml#/paths/~1auth~1user~1twofactorauth~1otp"
"/auth/twofactorauth/otp/verify":
$ref: "./paths/authentication.yaml#/paths/~1auth~1twofactorauth~1otp~1verify"
"/auth/twofactorauth/emailotp/verify":
Expand Down
16 changes: 16 additions & 0 deletions openapi/components/paths/authentication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,22 @@ paths:
security:
- authCookie: []
parameters: []
/auth/user/twofactorauth/otp:
get:
summary: Get 2FA Recovery codes
operationId: getRecoveryCodes
x-codeSamples:
$ref: "../codeSamples/authentication.yaml#/~1auth~1user~1twofactorauth~1otp/get"
responses:
'200':
$ref: ../responses/authentication/Get2FARecoveryCodesResponse.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
description: Gets the OTP (One Time Password) recovery codes for accounts with 2FA-protection enabled.
tags:
- authentication
security:
- authCookie: []
/auth/twofactorauth/otp/verify:
post:
summary: Verify 2FA code with Recovery code
Expand Down
2 changes: 1 addition & 1 deletion openapi/components/paths/instances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ paths:
description: |-
Close an instance or update the closedAt time when it will be closed.

You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission.
You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-manage` permission.
responses:
'200':
$ref: ../responses/instances/InstanceResponse.yaml
Expand Down
2 changes: 2 additions & 0 deletions openapi/components/paths/users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ paths:
responses:
'200':
$ref: ../responses/users/CurrentUserResponse.yaml
'400':
$ref: ../responses/users/CurrentPasswordRequiredError.yaml
'401':
$ref: ../responses/MissingCredentialsError.yaml
description: Update a users information such as the email and birthday.
Expand Down
18 changes: 18 additions & 0 deletions openapi/components/requests/UpdateUserRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ type: object
properties:
email:
type: string
unsubscribe:
type: boolean
birthday:
type: string
format: date
Expand Down Expand Up @@ -35,3 +37,19 @@ properties:
description: MUST be a valid VRChat /file/ url.
example: 'https://api.vrchat.cloud/api/1/file/file_76dc2964-0ce8-41df-b2e7-8edf994fee31/1'
minLength: 0
contentFilters:
description: These tags begin with `content_` and control content gating
type: array
items:
$ref: ../schemas/Tag.yaml
displayName:
description: MUST specify currentPassword as well to change display name
type: string
revertDisplayName:
description: MUST specify currentPassword as well to revert display name
type: boolean
password:
description: MUST specify currentPassword as well to change password
type: string
currentPassword:
type: string
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Returns the two factor recovery codes
content:
application/json:
schema:
$ref: ../../schemas/TwoFactorRecoveryCodes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Error response when a user attempts to change a property without supplying their current password.
content:
application/json:
schema:
$ref: ../../schemas/Error.yaml
5 changes: 5 additions & 0 deletions openapi/components/schemas/CurrentUser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ properties:
type: array
items:
type: string
contentFilters:
description: These tags begin with `content_` and control content gating
type: array
items:
$ref: ./Tag.yaml
currentAvatar:
$ref: ./AvatarID.yaml
currentAvatarImageUrl:
Expand Down
20 changes: 20 additions & 0 deletions openapi/components/schemas/TwoFactorRecoveryCodes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
title: TwoFactorRecoveryCodes
type: object
properties:
requiresTwoFactorAuth:
type: array
items:
type: string
otp:
type: array
items:
type: object
required:
- code
- used
properties:
code:
type: string
used:
type: boolean