All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
loginToken | POST /auth/token/login/ | Login with JWT token |
migrateLegacyAuth | GET /legacy/auth/ | Legacy auth migration |
obtainToken | GET /auth/token/obtain/ | Obtain JWT token |
updateUserProfile | PATCH /auth/profile/ | Update profile |
userProfile | GET /auth/profile/ | Profile |
whoAmI | GET /auth/whoami/ | Who am I |
TokenLogin loginToken(createTokenLogin)
Login with JWT token
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = AuthForestVPNAPI()
val createTokenLogin : CreateTokenLogin = // CreateTokenLogin |
try {
val result : TokenLogin = apiInstance.loginToken(createTokenLogin)
println(result)
} catch (e: ClientException) {
println("4xx response calling AuthForestVPNAPI#loginToken")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AuthForestVPNAPI#loginToken")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
createTokenLogin | CreateTokenLogin | [optional] |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
LegacyAuthMigrationToken migrateLegacyAuth()
Legacy auth migration
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = AuthForestVPNAPI()
try {
val result : LegacyAuthMigrationToken = apiInstance.migrateLegacyAuth()
println(result)
} catch (e: ClientException) {
println("4xx response calling AuthForestVPNAPI#migrateLegacyAuth")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AuthForestVPNAPI#migrateLegacyAuth")
e.printStackTrace()
}
This endpoint does not need any parameter.
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
TokenObtain obtainToken()
Obtain JWT token
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = AuthForestVPNAPI()
try {
val result : TokenObtain = apiInstance.obtainToken()
println(result)
} catch (e: ClientException) {
println("4xx response calling AuthForestVPNAPI#obtainToken")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AuthForestVPNAPI#obtainToken")
e.printStackTrace()
}
This endpoint does not need any parameter.
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
User updateUserProfile(user)
Update profile
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = AuthForestVPNAPI()
val user : User = // User |
try {
val result : User = apiInstance.updateUserProfile(user)
println(result)
} catch (e: ClientException) {
println("4xx response calling AuthForestVPNAPI#updateUserProfile")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AuthForestVPNAPI#updateUserProfile")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
user | User | [optional] |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
User userProfile()
Profile
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = AuthForestVPNAPI()
try {
val result : User = apiInstance.userProfile()
println(result)
} catch (e: ClientException) {
println("4xx response calling AuthForestVPNAPI#userProfile")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AuthForestVPNAPI#userProfile")
e.printStackTrace()
}
This endpoint does not need any parameter.
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
User whoAmI()
Who am I
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = AuthForestVPNAPI()
try {
val result : User = apiInstance.whoAmI()
println(result)
} catch (e: ClientException) {
println("4xx response calling AuthForestVPNAPI#whoAmI")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AuthForestVPNAPI#whoAmI")
e.printStackTrace()
}
This endpoint does not need any parameter.
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json