Identify the organization behind an API key
curl --request GET \
--url https://api.printeasy.adfinite.com/v1/whoami \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.printeasy.adfinite.com/v1/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.printeasy.adfinite.com/v1/whoami"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"apiKeyId": "Kd82jQm1Zp7sW0xe",
"mode": "test",
"organization": {
"id": "Yx3kP9qL2mN8rT4v",
"name": "Acme Logistics"
},
"plan": "lite"
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}Account
Identify the organization behind an API key
Returns the organization, mode, key id and plan of the API key that signs the request. Use it to check that a key works.
GET
/
v1
/
whoami
Identify the organization behind an API key
curl --request GET \
--url https://api.printeasy.adfinite.com/v1/whoami \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.printeasy.adfinite.com/v1/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.printeasy.adfinite.com/v1/whoami"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"apiKeyId": "Kd82jQm1Zp7sW0xe",
"mode": "test",
"organization": {
"id": "Yx3kP9qL2mN8rT4v",
"name": "Acme Logistics"
},
"plan": "lite"
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}Authorizations
ApiKeyAuthBasicAuth
Send Authorization: Bearer <API key>. Use a pe_test_ key in the playground; it only reaches virtual test printers.
Was this page helpful?