GET /user
Return the authenticated user for an account API token. A quick way to verify a token works.
curl https://api.botect.ai/user \
-H "Authorization: Bearer YOUR_ACCOUNT_TOKEN"
const res = await fetch('https://api.botect.ai/user', {
headers: { Authorization: `Bearer ${process.env.BOTECT_TOKEN}` },
});
const user = await res.json();
import os, requests
r = requests.get(
"https://api.botect.ai/user",
headers={"Authorization": f"Bearer {os.environ['BOTECT_TOKEN']}"},
)
user = r.json()
{
"id": 42,
"name": "Ada Lovelace",
"email": "ada@example.com",
"created_at": "2026-01-01T00:00:00Z"
}
{
"error": "Authentication required",
"message": "Unauthenticated.",
"code": "UNAUTHENTICATED"
}
Returns the user the account API token authenticates as. The simplest way to confirm a token is valid.
GET https://api.botect.ai/user
Authentication
Account API token via Authorization: Bearer <token>. See Authentication.
Example
A valid token returns 200 with the user object; a bad or missing token returns 401. To inspect the account the token acts on, use Account context.
Was this page helpful?