Get API token
/api-token/{id}
Path Parameters
The ID of the token you want to retrieve.
1ba1f401-7183-47c5-9e39-e8e257e3c795Query Parameters
Filter tokens by environment ID (user should have access to the environment).
8a2b104d-74a6-47f2-b93e-c6b611e82391Filter tokens by name.
my-dev-tokenResponse Body
The date and time when the token was created.
2021-08-10T10:00:00.000ZThe ID of the user who created this token.
b7bb7578-bff2-42b2-a57f-46c874865296The ID of the environment this token is scoped to.
8a2b104d-74a6-47f2-b93e-c6b611e82391The ID of the API token.
1ba1f401-7183-47c5-9e39-e8e257e3c795A descriptive name for the token.
My tokenThe date and time when the token was last updated.
2021-08-10T11:00:00.000Zcurl -X GET 'https://api.truto.one/api-token/{id}' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json'const response = await fetch('https://api.truto.one/api-token/{id}', {
method: 'GET',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/api-token/{id}"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
response = requests.get(url, headers=headers, params=params)
print(response.json())import Truto from '@truto/truto-ts-sdk';
const truto = new Truto({
token: '<your_api_token>',
});
const result = await truto.apiToken.get('<id>');
console.log(result);import asyncio
from truto_python_sdk import TrutoApi
truto_api = TrutoApi(token="<your_api_token>")
async def main():
result = await truto_api.api_tokens.get("<id>")
print(result)
asyncio.run(main())