Login as Trusted Application
Create a token for a trusted application, which can then be passed to other web services.
POST https://instance.securid.com/aveksa/command.submit?cmd=getLoginInstloginTrustedAppructions
💡 Info: The
Client Id,Client Secret, andAuth URLare part of the details for the trusted application on the Admin > Web Services > Trusted Application page.
Request​
Parameters​
- command
- format
loginTrustedApp| properties | (Default) key=value. most useful when requesting a single object. If multiple objects are returned, values is a csv. ie key=value1,value2,value3 where value1 is the value for the first object, value2 is the value for the 2nd object, etc. |
| json | Useful format for parsing into javascript or other languages. See www.json.org for details. |
Headers​
- ClientId
- ClientSecret
- Accept
- Content-Type
Client IDClient Secretapplication/jsonapplication/jsonResponse​
Parameters​
type | Executed command name |
token | The security token for this user |
Examples​
Request​
- Curl
- Python
- Node.js
curl -L -X POST \
"https://instance.securid.com/aveksa/command.submit?cmd=loginTrustedApp&format=json" \
-H "ClientId: 624366536445383515" \
-H "ClientSecret: auth31a2579c1238c21f0d8:17890a74:18a1462d107:-7fec0.7081724190419978" \
-H "Content-Type: application/json"
import requests, json
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "loginTrustedApp",
"format": "json"
}
headers = {
'ClientId': 'your_client_id_here',
'ClientSecret': 'your_client_secret_here',
'Content-Type': 'application/json'
}
response = requests.post(url, params=params, headers=headers)
if response.status_code == 200:
data = response.json()
token = data.get("token")
print(f"Token: {token}")
else:
print(f"Request failed with status code {response.status_code}")
const axios = require('axios');
const url = "https://instance.securid.com/aveksa/command.submit";
const params = {
cmd: "loginTrustedApp",
format: "json"
};
const headers = {
'ClientId': 'your_client_id_here',
'ClientSecret': 'your_client_secret_here',
'Content-Type': 'application/json'
};
axios.post(url, null, { params, headers })
.then(response => {
if (response.status === 200) {
const responseData = response.data;
const token = responseData.token;
console.log(`Token: ${token}`);
} else {
console.log(`Request failed with status code ${response.status}`);
}
})
.catch(error => {
console.error('Error:', error);
});
Response​
- 200
- 401
{
"token": "ta31012485e36e3be2c9:-28aff589:18a2295240d:-7bcd0.529824866054087"
}
<html>
<head>
<title>Error</title>
</head>
<body>Application could not be validated Query String=cmd=loginTrustedApp</body>
</html>