Skip to main content

Authentication

Adspire.AI API uses JWT bearer authentication. Clients authenticate using an Authorization: Bearer <token> header.

Login

POST /api/auth/login

Response includes:

  • access_token
  • token_type
  • expires_in

Refresh token

POST /api/auth/refresh

Get current user

GET /api/auth/me

Service-to-service auth (connectors)

For connectors and other server-side integrations, use one of the following patterns.

  • Create a dedicated connector user in Adspire.AI.
  • Store CONNECTOR_API_EMAIL + CONNECTOR_API_PASSWORD in the connector service.
  • Log in once and cache the JWT until it expires.

2) Static JWT (optional)

  • Provide CONNECTOR_API_TOKEN.
  • This token is sent as-is on every request.
  • Use only if you manage token rotation and revocation out-of-band.

Authorization header

Authorization: Bearer <jwt>