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
var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;
// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"
var apiInstance = new ArtikCloud.TokensApi()
var tokenInfo = new ArtikCloud.TokenRequest(); // {TokenRequest} Token object to be checked
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.checkToken(tokenInfo, callback);
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
var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;
// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"
var apiInstance = new ArtikCloud.TokensApi()
var grantType = "grantType_example"; // {String} Grant Type.
var refreshToken = "refreshToken_example"; // {String} Refresh Token.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.refreshToken(grantType, refreshToken, callback);
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
var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;
// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"
var apiInstance = new ArtikCloud.TokensApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.tokenInfo(callback);
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json