Generate a token
curl --request POST \
--url https://acme.getid.ee/api/v1/token \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"ttl": 86400,
"accessLevel": "root"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ttl: 86400, accessLevel: 'root'})
};
fetch('https://acme.getid.ee/api/v1/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://acme.getid.ee/api/v1/token"
payload = {
"ttl": 86400,
"accessLevel": "root"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"responseCode": 200,
"token": "<string>"
}SDK sessions
Generate a token
Token can be used for accessing other API methods
POST
/
api
/
v1
/
token
Generate a token
curl --request POST \
--url https://acme.getid.ee/api/v1/token \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"ttl": 86400,
"accessLevel": "root"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ttl: 86400, accessLevel: 'root'})
};
fetch('https://acme.getid.ee/api/v1/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://acme.getid.ee/api/v1/token"
payload = {
"ttl": 86400,
"accessLevel": "root"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"responseCode": 200,
"token": "<string>"
}Authorizations
Headers
Body
application/json