Skip to main content
Most watsonx Orchestrate Developer Edition API endpoints require a Bearer token in the Authorization header. The watsonx Orchestrate Developer Edition server uses a two-step token flow. First, post your username and password to POST /api/v1/auth/token to get a global user token. Then, post the same credentials to POST /api/v1/auth/token?tenant_id=<tenant_id> to exchange it for a tenant-scoped token. All API calls require the tenant-scoped token. Use the global user token only as an intermediate credential to look up your tenant ID.
1

Get a global user token

BASH
The username and password you supply are the credentials you configured when starting the server with orchestrate server start, using the --service-username and --service-password flags.
Response:
2

Look up your tenant ID

Use the global token to list tenants and find your tenant ID:
BASH
3

Get a tenant-scoped token

BASH
Response:
Use the access_token value from this response as the Bearer token in all subsequent API calls:
BASH