Authentication

GET /api/auth/me

GET https://api.iagenify.com/api/auth/me

Return the public account record for the authenticated caller.

Bearer or API keyJSONread

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

CodeMeaning
no_tokenNo supported Authorization header was sent.
invalid_tokenThe bearer token is invalid.
session_expiredThe bearer session is no longer active.
user_not_foundThe account is unavailable.