HTTP request
curl https://api.iagenify.com/api/auth/me \
-X GET \
-H "Authorization: Bearer $IAGENIFY_TOKEN"JavaScript
const response = await fetch("https://api.iagenify.com/api/auth/me", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.IAGENIFY_TOKEN}` },
});
const result = await response.json();
if (!response.ok) throw new Error(result.error);Python
import os, requests
response = requests.request(
"GET",
"https://api.iagenify.com/api/auth/me",
headers={"Authorization": "Bearer " + os.environ["IAGENIFY_TOKEN"]},
timeout=30,
)
response.raise_for_status()
result = response.json()Successful response
{ ok: true, user: { id: "…", email: "…", credits: 120 } }The user object is the account's public representation. Treat additional fields as optional unless they are documented for your integration.
Errors
| Code | Meaning |
|---|---|
| no_token | No supported Authorization header was sent. |
| invalid_token | The bearer token is invalid. |
| session_expired | The bearer session is no longer active. |
| user_not_found | The account is unavailable. |