app.flexorch.com uses JWT authentication internally.
If you are building a server-side integration, a CI/CD pipeline, or any backend service, use API Keys instead — they are simpler and do not expire.
How JWT authentication works
When you log in, FlexOrch returns two tokens:- Access token — a short-lived JWT (valid for 1 hour) that you pass with every API request.
- Refresh token — a longer-lived token you use to obtain a new access token without requiring the user to log in again.
Bearer token in the Authorization header. When it expires, call the refresh endpoint to get a new one silently in the background.
Sign up
Create a new FlexOrch account programmatically by posting the user’s email and password:Log in
Exchange email and password for an access token and a refresh token:The JWT to include in all subsequent API requests. Valid for
expires_in seconds (3600 = 1 hour).A longer-lived token used to obtain a new access token. Store this securely — treat it like a password.
Always
"bearer". Use as the scheme in the Authorization header.Seconds until the access token expires. Currently 3600 (1 hour).
Using an access token
Pass the access token in theAuthorization header with the Bearer scheme:
Refreshing an access token
Access tokens expire after 1 hour. When a request returns401 Unauthorized, use the refresh token to get a new access token without prompting the user to log in again:
API key vs JWT — which should you use?
| Scenario | Recommended method |
|---|---|
| Server-to-server API integration | API Key |
| CI/CD pipeline or automation script | API Key |
| Backend microservice calling FlexOrch | API Key |
| Browser-based application (user login) | JWT |
| Mobile app with individual user accounts | JWT |
Platform dashboard (app.flexorch.com) | JWT (handled automatically) |
You can use both methods in the same product — for example, a JWT flow for your user-facing dashboard and an API key for your backend data ingestion pipeline.