mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 15:45:35 +00:00
186 lines
6.1 KiB
Markdown
186 lines
6.1 KiB
Markdown
# \AuthenticationApi
|
|
|
|
All URIs are relative to *https://api.vrchat.cloud/api/1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**delete_user_by_id**](AuthenticationApi.md#delete_user_by_id) | **PUT** /user/{userId}/delete | Delete User
|
|
[**get_current_user**](AuthenticationApi.md#get_current_user) | **GET** /auth/user | Login and/or Get Current User Info
|
|
[**logout**](AuthenticationApi.md#logout) | **PUT** /logout | Logout
|
|
[**verify2_fa**](AuthenticationApi.md#verify2_fa) | **POST** /auth/twofactorauth/totp/verify | Verify 2FA code
|
|
[**verify_auth_token**](AuthenticationApi.md#verify_auth_token) | **GET** /auth | Verify Auth Token
|
|
[**verify_recovery_code**](AuthenticationApi.md#verify_recovery_code) | **POST** /auth/twofactorauth/otp/verify | Verify 2FA code with Recovery code
|
|
|
|
|
|
|
|
## delete_user_by_id
|
|
|
|
> crate::models::CurrentUser delete_user_by_id(user_id)
|
|
Delete User
|
|
|
|
Deletes the account with given ID. Normal users only have permission to delete their own account. Account deletion is 14 days from this request, and will be cancelled if you do an authenticated request with the account afterwards. **VRC+ NOTE:** Despite the 14-days cooldown, any VRC+ subscription will be cancelled **immediately**. **METHOD NOTE:** Despite this being a Delete action, the method type required is PUT.
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Required | Notes
|
|
------------- | ------------- | ------------- | ------------- | -------------
|
|
**user_id** | **String** | | [required] |
|
|
|
|
### Return type
|
|
|
|
[**crate::models::CurrentUser**](CurrentUser.md)
|
|
|
|
### Authorization
|
|
|
|
[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
|
|
## get_current_user
|
|
|
|
> crate::models::CurrentUser get_current_user()
|
|
Login and/or Get Current User Info
|
|
|
|
Login and/or Get user data from your VRChat account. If `Authorization` header is present then a new login session will be generated, and a new `auth` cookie is returned. **WARNING: Session Limit:** Each authentication with login credentials counts as a separate session, out of which you have a limited amount. Make sure to save and reuse the `auth` cookie whenever you can, and avoid sending the Authorization header unless strictly neccesary. While the exact number of simultaneous open sessions is secret, expect to **very fast** run into the rate-limit and be temporarily blocked from making new sessions until the old ones expire.
|
|
|
|
### Parameters
|
|
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**crate::models::CurrentUser**](CurrentUser.md)
|
|
|
|
### Authorization
|
|
|
|
[authCookie](../README.md#authCookie), [authHeader](../README.md#authHeader), [twoFactorAuthCookie](../README.md#twoFactorAuthCookie)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
|
|
## logout
|
|
|
|
> crate::models::Success logout()
|
|
Logout
|
|
|
|
Invalidates the auth cookie.
|
|
|
|
### Parameters
|
|
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**crate::models::Success**](Success.md)
|
|
|
|
### Authorization
|
|
|
|
[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
|
|
## verify2_fa
|
|
|
|
> crate::models::InlineResponse2001 verify2_fa(inline_object)
|
|
Verify 2FA code
|
|
|
|
Finishes the login sequence with a normal 2FA-generated code for accounts with 2FA-protection enabled.
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Required | Notes
|
|
------------- | ------------- | ------------- | ------------- | -------------
|
|
**inline_object** | Option<[**InlineObject**](InlineObject.md)> | | |
|
|
|
|
### Return type
|
|
|
|
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
|
|
|
|
### Authorization
|
|
|
|
[authCookie](../README.md#authCookie)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
|
|
## verify_auth_token
|
|
|
|
> crate::models::InlineResponse200 verify_auth_token()
|
|
Verify Auth Token
|
|
|
|
Verify whether the currently provided Auth Token is valid.
|
|
|
|
### Parameters
|
|
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**crate::models::InlineResponse200**](inline_response_200.md)
|
|
|
|
### Authorization
|
|
|
|
[apiKeyCookie](../README.md#apiKeyCookie), [authCookie](../README.md#authCookie)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
|
|
## verify_recovery_code
|
|
|
|
> crate::models::InlineResponse2001 verify_recovery_code(inline_object1)
|
|
Verify 2FA code with Recovery code
|
|
|
|
Finishes the login sequence with an OTP (One Time Password) recovery code for accounts with 2FA-protection enabled.
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Required | Notes
|
|
------------- | ------------- | ------------- | ------------- | -------------
|
|
**inline_object1** | Option<[**InlineObject1**](InlineObject1.md)> | | |
|
|
|
|
### Return type
|
|
|
|
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
|
|
|
|
### Authorization
|
|
|
|
[authCookie](../README.md#authCookie)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|