
Enables interaction with the unofficial VRChat API, supporting all REST calls. Includes authentication, user information retrieval, and guidelines for responsible API usage.
A Kotlin client to interact with the unofficial VRChat API. Supports all REST calls specified in the API specification.
This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API.
Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:
- We do not provide documentation or support for the API.
- Do not make queries to the API more than once per 60 seconds.
- Abuse of the API may result in account termination.
- Access to API endpoints may break at any given time, with no warning.
As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it.
First add the package to to your project:
commonMain.dependencies {
implementation("io.github.kamo030:vrchatapi-kotlin:latest")
implementation("io.ktor:ktor-client-core:latest")
implementation("io.ktor:ktor-client-okhttp:latest")
implementation("io.ktor:ktor-client-content-negotiation:latest")
implementation("io.ktor:ktor-serialization-kotlinx-json:latest")
}
jvmMain.dependencies {
implementation("io.ktor:ktor-client-okhttp:latest")
}
iosMain.dependencies {
implementation("io.ktor:ktor-client-darwin:latest")
}Below is an example on how to login to the API and fetch your own user information.
val apiClient = ApiClient {
install(HttpCookies)
}
val authApi = AuthenticationApi(apiClient)
runBlocking {
val currentUser = runCatching {
val response = authApi.getCurrentUser("username", "password")
response.body()
}.getOrElse { e ->
if (e.toString().contains("emailOtp")) {
println("2FA Email code:")
val code = TwoFactorEmailCode("code")
authApi.verify2FAEmailCode(code)
} else {
println("2FA Authenticator code:")
val code = TwoFactorAuthCode("code")
authApi.verify2FA(code)
}
val response = authApi.getCurrentUser()
response.body()
}
println(currentUser)
}Contributions are welcome, This project is generated by the OpenAPI specification, and improve and extend it, so if you want to contribute you can directly launch pull requests or improve the OpenAPI specification.
A Kotlin client to interact with the unofficial VRChat API. Supports all REST calls specified in the API specification.
This is the official response of the VRChat Team (from Tupper more specifically) on the usage of the VRChat API.
Use of the API using applications other than the approved methods (website, VRChat application) are not officially supported. You may use the API for your own application, but keep these guidelines in mind:
- We do not provide documentation or support for the API.
- Do not make queries to the API more than once per 60 seconds.
- Abuse of the API may result in account termination.
- Access to API endpoints may break at any given time, with no warning.
As stated, this documentation was not created with the help of the official VRChat team. Therefore this documentation is not an official documentation of the VRChat API and may not be always up to date with the latest versions. If you find that a page or endpoint is not longer valid please create an issue and tell us so we can fix it.
First add the package to to your project:
commonMain.dependencies {
implementation("io.github.kamo030:vrchatapi-kotlin:latest")
implementation("io.ktor:ktor-client-core:latest")
implementation("io.ktor:ktor-client-okhttp:latest")
implementation("io.ktor:ktor-client-content-negotiation:latest")
implementation("io.ktor:ktor-serialization-kotlinx-json:latest")
}
jvmMain.dependencies {
implementation("io.ktor:ktor-client-okhttp:latest")
}
iosMain.dependencies {
implementation("io.ktor:ktor-client-darwin:latest")
}Below is an example on how to login to the API and fetch your own user information.
val apiClient = ApiClient {
install(HttpCookies)
}
val authApi = AuthenticationApi(apiClient)
runBlocking {
val currentUser = runCatching {
val response = authApi.getCurrentUser("username", "password")
response.body()
}.getOrElse { e ->
if (e.toString().contains("emailOtp")) {
println("2FA Email code:")
val code = TwoFactorEmailCode("code")
authApi.verify2FAEmailCode(code)
} else {
println("2FA Authenticator code:")
val code = TwoFactorAuthCode("code")
authApi.verify2FA(code)
}
val response = authApi.getCurrentUser()
response.body()
}
println(currentUser)
}Contributions are welcome, This project is generated by the OpenAPI specification, and improve and extend it, so if you want to contribute you can directly launch pull requests or improve the OpenAPI specification.