import 'package:forestvpn_api/api.dart';
All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
authorizeAccessTokenRequest | POST /auth/access-token-requests/{requestID}/authorize/ | Authorize access token request |
createAccessTokenRequest | POST /auth/access-token-requests/ | Create access token request |
getAccessTokenRequest | GET /auth/access-token-requests/{requestID}/ | Get access token request details |
loginToken | POST /auth/token/login/ | Login with JWT token |
migrateLegacyAuth | GET /legacy/auth/ | Legacy auth migration |
obtainToken | GET /auth/token/obtain/ | Obtain JWT token |
revokeAccessTokenRequest | POST /auth/access-token-requests/{requestID}/revoke/ | Revoke access token request |
updateUserPhoto | PATCH /auth/profile/photo/ | Update profile photo |
updateUserProfile | PATCH /auth/profile/ | Update profile |
userPhoto | GET /auth/profile/photo/ | Photo |
userProfile | GET /auth/profile/ | Profile |
whoAmI | GET /auth/whoami/ | Who am I |
AccessTokenRequest authorizeAccessTokenRequest(requestID)
Authorize access token request
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
final String requestID = requestID_example; // String |
try {
final response = api.authorizeAccessTokenRequest(requestID);
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->authorizeAccessTokenRequest: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
requestID | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccessTokenRequest createAccessTokenRequest(name)
Create access token request
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
final String name = name_example; // String |
try {
final response = api.createAccessTokenRequest(name);
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->createAccessTokenRequest: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
name | String | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccessTokenRequest getAccessTokenRequest(requestID)
Get access token request details
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
final String requestID = requestID_example; // String |
try {
final response = api.getAccessTokenRequest(requestID);
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->getAccessTokenRequest: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
requestID | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TokenLogin loginToken(createTokenLogin)
Login with JWT token
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
final CreateTokenLogin createTokenLogin = ; // CreateTokenLogin |
try {
final response = api.loginToken(createTokenLogin);
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->loginToken: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
createTokenLogin | CreateTokenLogin | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LegacyAuthMigrationToken migrateLegacyAuth()
Legacy auth migration
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
try {
final response = api.migrateLegacyAuth();
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->migrateLegacyAuth: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TokenObtain obtainToken()
Obtain JWT token
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
try {
final response = api.obtainToken();
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->obtainToken: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccessTokenRequest revokeAccessTokenRequest(requestID)
Revoke access token request
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
final String requestID = requestID_example; // String |
try {
final response = api.revokeAccessTokenRequest(requestID);
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->revokeAccessTokenRequest: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
requestID | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserPhoto updateUserPhoto(userPhoto)
Update profile photo
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
final UserPhoto userPhoto = ; // UserPhoto |
try {
final response = api.updateUserPhoto(userPhoto);
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->updateUserPhoto: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
userPhoto | UserPhoto | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User updateUserProfile(user)
Update profile
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
final User user = ; // User |
try {
final response = api.updateUserProfile(user);
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->updateUserProfile: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
user | User | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserPhoto userPhoto()
Photo
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
try {
final response = api.userPhoto();
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->userPhoto: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User userProfile()
Profile
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
try {
final response = api.userProfile();
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->userProfile: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User whoAmI()
Who am I
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAuthApi();
try {
final response = api.whoAmI();
print(response);
} catch on DioError (e) {
print('Exception when calling AuthApi->whoAmI: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]