All URIs are relative to https://api.artik.cloud/v1.1
| Method | HTTP request | Description |
|---|---|---|
| checkToken | POST /accounts/checkToken | Check Token |
| refreshToken | POST /accounts/token | Refresh Token |
| tokenInfo | GET /accounts/tokenInfo | Token Info |
CheckTokenResponse checkToken(tokenInfo)
Check Token
(Deprecated) Check Token. See tokenInfo
// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.TokensApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");
TokensApi apiInstance = new TokensApi();
TokenRequest tokenInfo = new TokenRequest(); // TokenRequest | Token object to be checked
try {
CheckTokenResponse result = apiInstance.checkToken(tokenInfo);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TokensApi#checkToken");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| tokenInfo | TokenRequest | Token object to be checked |
- Content-Type: Not defined
- Accept: application/json
RefreshTokenResponse refreshToken(grantType, refreshToken)
Refresh Token
Refresh Token
// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.TokensApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");
TokensApi apiInstance = new TokensApi();
String grantType = "grantType_example"; // String | Grant Type.
String refreshToken = "refreshToken_example"; // String | Refresh Token.
try {
RefreshTokenResponse result = apiInstance.refreshToken(grantType, refreshToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TokensApi#refreshToken");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| grantType | String | Grant Type. | |
| refreshToken | String | Refresh Token. |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
TokenInfoSuccessResponse tokenInfo()
Token Info
Returns the Token Information
// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.TokensApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");
TokensApi apiInstance = new TokensApi();
try {
TokenInfoSuccessResponse result = apiInstance.tokenInfo();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TokensApi#tokenInfo");
e.printStackTrace();
}This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json