curl https://api.avina.io/v1/me \
-H "Authorization: Bearer $AVINA_API_KEY"
import os
import requests
response = requests.get(
"https://api.avina.io/v1/me",
headers={"Authorization": f"Bearer {os.environ['AVINA_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
const response = await fetch(`https://api.avina.io/v1/me`, {
headers: {
Authorization: `Bearer ${process.env.AVINA_API_KEY}`,
},
});
const data = await response.json();
console.log(data);
{
"object": "api_key",
"id": "key_3f9a1c",
"name": "Production server",
"workspace": { "id": "0b7c8a2e-4d1f-4e39-9a6b-2f5d7c8e9a01", "name": "Acme Inc" }
}
{
"error": {
"code": "invalid_api_key",
"message": "The API key is invalid or revoked.",
"request_id": "req_8f2a61c09d4e7b3a5f10c2d8"
}
}
Get the current API key
Returns the API key making the request and the workspace it belongs to.
GET
/
v1
/
me
curl https://api.avina.io/v1/me \
-H "Authorization: Bearer $AVINA_API_KEY"
import os
import requests
response = requests.get(
"https://api.avina.io/v1/me",
headers={"Authorization": f"Bearer {os.environ['AVINA_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
const response = await fetch(`https://api.avina.io/v1/me`, {
headers: {
Authorization: `Bearer ${process.env.AVINA_API_KEY}`,
},
});
const data = await response.json();
console.log(data);
{
"object": "api_key",
"id": "key_3f9a1c",
"name": "Production server",
"workspace": { "id": "0b7c8a2e-4d1f-4e39-9a6b-2f5d7c8e9a01", "name": "Acme Inc" }
}
{
"error": {
"code": "invalid_api_key",
"message": "The API key is invalid or revoked.",
"request_id": "req_8f2a61c09d4e7b3a5f10c2d8"
}
}
Use it to check that a key works.
Every error uses the same shape. See Errors.
Response
200 The key and its workspace.
string
required
Always
api_key.string
required
The API key’s identifier. Not the secret.
string | null
The label given to the key when it was created.
object
required
Errors
| Status | Code | When |
|---|---|---|
401 | invalid_api_key | The API key is missing, invalid or revoked. |
429 | rate_limited | Too many requests. Retry after Retry-After seconds. |
500 | internal_error | Something went wrong on our side. Retry with backoff, and with the same Idempotency-Key if you sent one. |
curl https://api.avina.io/v1/me \
-H "Authorization: Bearer $AVINA_API_KEY"
import os
import requests
response = requests.get(
"https://api.avina.io/v1/me",
headers={"Authorization": f"Bearer {os.environ['AVINA_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
const response = await fetch(`https://api.avina.io/v1/me`, {
headers: {
Authorization: `Bearer ${process.env.AVINA_API_KEY}`,
},
});
const data = await response.json();
console.log(data);
{
"object": "api_key",
"id": "key_3f9a1c",
"name": "Production server",
"workspace": { "id": "0b7c8a2e-4d1f-4e39-9a6b-2f5d7c8e9a01", "name": "Acme Inc" }
}
{
"error": {
"code": "invalid_api_key",
"message": "The API key is invalid or revoked.",
"request_id": "req_8f2a61c09d4e7b3a5f10c2d8"
}
}

