Guides
Authentication
How to authenticate against the Inspow API with a JWT Bearer token or an API Key.
The Inspow API accepts two credentials:
- A User’s JWT token (Bearer scheme), obtained with their email and password.
- An API key (
insp_live_…) from your Organization, for server-to-server integrations (see API keys).
1. Get a token
Section titled “1. Get a token”Send the credentials to the login endpoint. If the email exists in several organizations,
specify which one with tenantSlug:
curl -X POST https://backend.inspow.com.co/api/v1/access-control/auth/login \ -H "Content-Type: application/json" \ -d '{ "email": "you@example.com", "password": "••••••••", "tenantSlug": "my-organization" }'Like every API response, it comes wrapped in { "data": …, "meta": … }. The token is in
data.token (together with the User’s details in data.user).
If the User has two-step verification
Section titled “If the User has two-step verification”If the account has 2FA enabled, the login does not return token, but requires2fa: true
and a tempToken (valid for about 5 minutes). Complete it with the code from the
authenticator app:
curl -X POST https://backend.inspow.com.co/api/v1/access-control/auth/2fa/verify \ -H "Content-Type: application/json" \ -d '{ "tempToken": "<TEMP_TOKEN>", "code": "123456" }'To use a backup code, also send "isBackupCode": true. For automated integrations, use an
API Key instead.
2. Use the token
Section titled “2. Use the token”Include the token in the Authorization header of every protected request:
curl https://backend.inspow.com.co/api/v1/access-control/auth/user/me \ -H "Authorization: Bearer <YOUR_TOKEN>"API keys
Section titled “API keys”For server-to-server integrations, don’t use a User’s token: create an
API key in Developers and use it against the public API
(https://backend.inspow.com.co/api/public/v1) with Authorization: Bearer insp_live_…. Legacy
ak_ keys keep working on /api/v1 until you revoke them.