Authentication
Every request to the Flint API carries one credential, in the Authorization header as a bearer token. For a server integration, that credential is a secret API key. The key decides everything else: a flint_test_... key runs in test mode against the one sandbox it's bound to, and a flint_live_... key runs against your live account with real money. Test and live requests go to the same host, https://api.withflintpay.com, with no mode flag. Every Flint key is secret and belongs on your server.
Send your key#
Put the key after Bearer in the Authorization header. GET /v1/auth-context accepts API keys, CLI login tokens, workload tokens, partner app tokens, and onboarding sessions. It needs no scope and returns the credential's identity, mode, and current access:
curl https://api.withflintpay.com/v1/auth-context \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": {
"auth_type": "api_key",
"partner_app_install_id": null,
"api_key_id": "key_01KWJ93G11C7MF8REX91MDS0CD",
"name": "Local development",
"merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
"organization_id": "org_01KEZF7C00MTFBRRKJA6QQX04J",
"mode": "test",
"access": "restricted",
"sandbox_id": "test_01KNB061AGD0CYYF16M5QAQE3N",
"scopes": ["commerce.orders.write", "payments.payment_intents.write"]
},
"request_id": "req_01KWM6SZJQGQWNFPTAF5HE7MHH"
}
mode is test or live. Test credentials include sandbox_id; live credentials omit it. access is full, read_only, or restricted. scopes lists what the key can do today, including resolved scopes for full and read_only keys. Scoped tokens report access: restricted. Onboarding sessions instead report user_id, can_manage_api_keys, expires_at, and fresh_verification_expires_at; they have no access or scopes. Their merchant_id and sandbox_id are null when that setup context does not exist yet. The five auth_type values select separate response shapes. Dashboard sessions are refused with wrong_credential_type. Every authenticated response also carries a Flint-Mode header, test or live, and test-mode responses add Flint-Sandbox-Id, so you can assert the mode in a deploy check without an extra call.
For credentials bound to one context, Flint-Merchant-Id, Flint-Mode, and Flint-Sandbox-Id are optional assertions. Send them only when they match the credential's merchant, mode, and public sandbox ID. A conflicting value returns 403 FORBIDDEN with details[0].reason: context_mismatch, retry: none, error_source: caller, and param naming the header. A live credential cannot name a sandbox. This applies to API keys, CLI login and workload tokens, onboarding sessions, checkout tokens, customer sessions, and invoice access tokens. Onboarding sessions in test mode assert the merchant's default sandbox. Dashboard sessions use these headers to select a context.
Send exactly one Authorization header. Repeating it, even with the same value, returns 400 INVALID_REQUEST with a NOT_ALLOWED detail and param: Authorization, including on OAuth credential exchanges.
Returns non-secret metadata for the credential that sent the request.
Every response has an X-Request-Id header, and the body repeats it as request_id, or as error.request_id on a failure. It's req_ followed by 26 characters and identifies one request, so quote it when you ask Flint Help. A failure returns an error object in place of data.
What Flint reads#
Flint reads credentials only from one Authorization header, with the case-insensitive Bearer scheme (bearer and BEARER also work):
Authorization: Bearer YOUR_API_KEY
- Send one Authorization header. Repeating it, even with the same value, returns
400 INVALID_REQUEST, detailNOT_ALLOWED, andparam: Authorization. Spaces or tabs may separate the scheme and token, and may surround the header value. Whitespace inside the token and non-ASCII bytes are refused. - Other credential headers are refused. An authenticated endpoint rejects a request that carries
X-API-Key,X-Onboarding-Session-Token, orX-Developer-Session-Token, even when the header is empty andAuthorizationholds a valid key. The response is401 INVALID_CREDENTIALwithdetails[0].reasonmalformed, andparamnames the header to remove. Endpoints that take no credential ignore these headers. - HTTP Basic and other schemes are refused with
401 INVALID_CREDENTIAL, reasonmalformed, andparamAuthorization. - A key in the query string isn't read. The request has no credential, so it fails with
401 AUTHENTICATION_REQUIRED.
Test and live keys#
The key prefix picks the mode on every request.
flint_test_
Test keys
Run against one sandbox with its own orders, customers, and payments. Card charges are simulated and no money moves. Each test key is bound to one sandbox when it's created, so the key you send selects the sandbox. Keys from the dashboard are bound for you.
flint_live_
Live keys
Run against your live account and charge real cards. Live keys are never bound to a sandbox. Create one when you're ready to take real payments, with only the scopes that integration needs.
Test and live data never mix. An order created with a test key is invisible to a live key and to a key for another sandbox. To work somewhere else, send a key for that environment; a request can't switch it.
Two test-key failures come from the binding, and both are fixed by creating a key in an active sandbox:
- A test key that isn't bound to a sandbox returns
401 INVALID_CREDENTIALwithdetails[0].reasonmode_mismatch. - A test key whose sandbox was archived returns
401 INVALID_CREDENTIALwithdetails[0].reasonrevoked.
Sandboxes & test mode covers creating more sandboxes, resetting test data, and test cards. Going live covers swapping in a live key.
Get a key#
- The dashboard. Create test and live keys on the API keys page.
- The CLI. After
flint login,flint api-keys createcreates a key in the login's context. A live login fromflint login --livecreates live keys; see Going live. - API onboarding. A script or an agent can create the merchant account and its first sandbox key; see API & agent onboarding.
- A sandbox. A live full-access key or a freshly verified onboarding session can issue a test key bound to a sandbox with
POST /v1/api-keysand that sandbox'ssandbox_id. A live key or a session can name any of your active sandboxes. See Issue a key for an existing sandbox. - The API keys endpoints. A key with
accounts.api_keys.writecreates more keys in its own mode; see Manage keys over the API.
The full secret, secret_key, comes back only in the response that creates the key. Flint can't show it again. If you lose it, create a replacement and revoke the old key.
The key object#
A key has a non-secret ID for managing it and a secret for authenticating with it.
| Field | Description |
|---|---|
api_key_id | The key's ID, such as key_01KWJ93G11C7MF8REX91MDS0CD. Use it to retrieve, update, or revoke the key. Safe to log. |
key_prefix | The mode prefix and the first 8 characters of the secret, such as flint_test_9f8e7d6c. Safe to show in a UI or log to tell keys apart. |
secret_key | The full secret you send in Authorization. Present only in the create response. |
name | Your label for the key, up to 100 characters. |
access | full, read_only, or restricted. See Key access. |
scopes | The scopes the key holds now. For full and read_only keys, the list grows when Flint adds scopes. See Scopes. |
status | active, expired, or revoked. Only an active key authenticates. A key reads expired once expires_at has passed, and revoked after it's revoked, even if it also expired. |
expires_at | When the key stops authenticating. Absent when the key never expires. |
version | Increases each time the key is updated or revoked. Send it as expected_version when you change access or scopes. |
merchant_id | The merchant the key belongs to. |
sandbox_id | The sandbox a test key is bound to. Absent on live keys. |
partner_app_install_id | Always present. The connected app install the key is linked to, or null when unlinked. Immutable. Revoking the install or its grant for this key's environment revokes the key. |
created_by | The API key or user that created the key, as a resource_type and resource_id. A live key can create a sandbox's test key, so the creator can be in another mode. Absent when the creator is unavailable. |
revoked_at | When the key was revoked. Present only on revoked keys. |
last_used_at | When the key last authenticated a request. It updates at most once a minute. |
created_at, updated_at | When the key was created and last changed. |
Timestamps are RFC 3339.
Scopes#
Each key holds scopes such as commerce.orders.read, payments.payment_intents.write, or webhooks.write. Each endpoint checks for the scopes it needs, and a key without them gets 403 INSUFFICIENT_SCOPE. Give each key the fewest scopes its job needs, so a leaked key can do less.
- A write scope satisfies its own read scope. A key with
commerce.orders.writecan read and write orders, so it doesn't needcommerce.orders.readtoo. - A write scope doesn't cover another resource, and an unqualified scope doesn't cover a qualified one such as
commerce.refunds.tax_overrides.write. - Some endpoints accept one of several scopes. Reading orders accepts
commerce.orders.readorcommerce.orders.write. The reference lists each operation's scopes and whether it needs all of them or any one.
A scope failure names the requirement and what's missing:
{
"error": {
"type": "authorization_error",
"code": "INSUFFICIENT_SCOPE",
"message": "The API key must include all required scopes: commerce.orders.write.",
"param": "scope",
"error_source": "caller",
"doc_url": "https://developers.withflintpay.com/docs/errors#insufficient_scope",
"request_id": "req_01KWM63GKKF3Z0ZEXED5ZD807C",
"remediation": {
"retry": "none",
"next_steps": "Create or use an API key with the required scope, then retry the request."
},
"details": [
{
"code": "INSUFFICIENT_SCOPE",
"param": "scope",
"message": "The API key must include all required scopes: commerce.orders.write.",
"scope_requirement": {
"mode": "all",
"scopes": ["commerce.orders.write"]
},
"missing_scopes": ["commerce.orders.write"]
}
]
}
}
In details[0], scope_requirement.mode is all when the endpoint needs every listed scope and any when one is enough. missing_scopes lists the ones your key doesn't satisfy. Add them to the key, or use a key that has them.
Key access#
Every key declares access, and creating a key requires it:
access | The key holds | When Flint adds a scope |
|---|---|---|
full | Every scope full access includes for the key's mode | The key gains it |
read_only | The read scopes of full access for the key's mode | The key gains new read scopes |
restricted | Exactly the scopes you list | Nothing changes |
Flint resolves full and read_only keys on each request, so their scopes show what they hold today. A test key never holds a scope that only live keys can have. The scope catalog shows what full and read-only access include in each mode.
A full-access key suits local development or an agent you control. Give a production workload a restricted key with the scopes it needs, because a full key also gains every scope Flint adds later. See Scope keys to the job.
Send scopes only with access restricted, where it's required and must list at least one scope, each once. Keys created before access existed are restricted with the scopes they had.
Credentials that can mint keys#
Creating a key, workload identity, CLI login, or partner app install can grant access that outlasts the current session. A Dashboard or onboarding session needs identity verification within the last 300 seconds to grant full, read_only, or any scope outside this list.
commerce.bundles.readcommerce.catalog.readcommerce.products.readcommerce.subscription_plans.read
Among API credentials, only a full-access key can grant full, read_only, or these scopes.
accounts.api_keys.writeaccounts.workload_identities.writecommerce.gift_cards.secrets.writecommerce.license_keys.secrets.write
A session also needs a role that can manage the merchant's API keys. Without it, the request returns 403 FORBIDDEN with reason merchant_role_insufficient. If the session needs fresh verification, the response returns 403 IDENTITY_VERIFICATION_REQUIRED and reports its last verification in details[0].verified_at. Verify again in the Dashboard or start a new onboarding session, then retry. The response can identify the access field or a scope such as scopes[1] in param.
A test credential can't mint a live key at all: it mints only in its own sandbox. A scope the caller doesn't hold returns 403 INSUFFICIENT_SCOPE with reason scope_not_held, param scopes, and the scopes it lacks in details[0].missing_scopes. So a restricted key that can manage keys can't mint its own replacement with key management: use a full-access key or a freshly verified session. Keys that already hold a step-up scope keep it.
Manage keys over the API#
Listing and retrieving keys needs accounts.api_keys.read or accounts.api_keys.write. Creating, updating, and revoking keys needs accounts.api_keys.write.
Three rules decide what a key can manage:
- A key manages keys in its own mode. A test key sees and edits keys bound to its sandbox, and mints new keys there. A live key sees, edits, and mints live keys. Any other key's ID returns
404 RESOURCE_NOT_FOUNDwithparamapi_key_id. sandbox_idpicks a test key's sandbox. OnPOST /v1/api-keys, a live key, a live CLI login, or a Dashboard session sendssandbox_idto mint a test key bound to that sandbox, and omits it for a live key. A test key may send only its own sandbox's ID, and mints there either way; another sandbox's ID returns404 RESOURCE_NOT_FOUNDwithparamsandbox_id. Dashboard and onboarding sessions can name any of the merchant's active sandboxes, and an onboarding session must sendsandbox_id; its first key goes todefault_sandbox_id.sandbox_idis always the public sandbox ID.- A key grants only scopes it holds. Asking for more returns
403 INSUFFICIENT_SCOPEwith reasonscope_not_heldand the extra scopes indetails[0].missing_scopes. APATCHchecks any scopes it adds. Extending a key's expiry checks all its resulting permissions. A Dashboard session must verify again before editing a key withfullorread_onlyaccess or with restricted scopes outside the read allowlist. See credentials that can mint keys. - A key updates or revokes only keys whose scopes it holds. A restricted key can't revoke a key with more scopes than itself; the request returns
403 INSUFFICIENT_SCOPEwith reasonscope_not_held, naming the scopes it lacks.
Keys for connected apps#
When you give a platform a key, set the optional partner_app_install_id on POST /v1/api-keys. The link can't be added, changed, or removed afterward. Omit it for an unlinked key; null isn't accepted on create.
Only a live credential or a Dashboard session may explicitly set the field. The install must belong to the merchant, be active, and have an active grant for the new key's environment. Each install can have up to 25 active linked keys per environment; exceeding that returns 409 LIMIT_REACHED with reason partner_app_install_links.
Keys and merchant webhook endpoints created by a linked key inherit its install. A linked test key must omit the field and let Flint inherit the link. Revoking the install ends these keys and endpoints too; unlinked resources keep working. Link a key to a connected app lists the grant checks, credential restrictions, and errors. What revoking an install ends covers grant revokes, sandbox changes, and cleanup.
Create a key#
expires_at is optional. Set it for a contractor, a migration script, or a load test, and the key stops authenticating at that time. It must be in the future.
curl -X POST https://api.withflintpay.com/v1/api-keys \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ci-runner-key-2027-06" \
-d '{
"name": "CI runner",
"access": "restricted",
"scopes": ["commerce.orders.read"],
"expires_at": "2027-06-30T00:00:00Z"
}'
{
"data": {
"api_key_id": "key_01KWK4Q8Z1MB7F0T2S9R3V6HAX",
"name": "CI runner",
"key_prefix": "flint_test_9f8e7d6c",
"secret_key": "flint_test_9f8e7d6c...",
"merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
"sandbox_id": "test_01KNB061AGD0CYYF16M5QAQE3N",
"access": "restricted",
"scopes": ["commerce.orders.read"],
"status": "active",
"partner_app_install_id": null,
"expires_at": "2027-06-30T00:00:00Z",
"version": 1,
"created_by": {
"resource_type": "api_key",
"resource_id": "key_01KWJ93G11C7MF8REX91MDS0CD"
},
"created_at": "2026-10-28T16:20:00Z",
"updated_at": "2026-10-28T16:20:00Z"
},
"request_id": "req_01KWM6KKK9D0R8JXQJ49YHBJ73"
}
Store secret_key in your secrets manager straight away. Send an Idempotency-Key: if the response is lost, a retry with the same key and body returns the same API key instead of creating a second one, and returns its secret under the one-time secret rules.
A full-access key can create another full-access key with no scope list:
curl -X POST https://api.withflintpay.com/v1/api-keys \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_FULL_ACCESS_KEY" \
-d '{
"name": "Local agent",
"access": "full"
}'
Change a key's access or scopes#
PATCH /v1/api-keys/{api_key_id} replaces the key's whole scopes list when you send it with access restricted. Whenever the body includes access or scopes, send the version you read as expected_version, so your change can't undo a permission change someone made after you read the key:
curl -X PATCH https://api.withflintpay.com/v1/api-keys/key_1kmn0aExample \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"expected_version": 3,
"access": "restricted",
"scopes": ["commerce.orders.read"]
}'
A stale expected_version returns 409 VERSION_CONFLICT with the current version in details[0].current_version, and the key is unchanged. Read the key again, check its scopes, and resend with the new version.
Moving a key from full or read_only to restricted follows only the rules for restricted keys. A rename or an expiry change needs no expected_version. "expires_at": null removes an expiry, and a future expires_at reactivates an expired key. A revoked key can't be updated. Creating and updating keys count against the sensitive_write rate limit, because both can grant access.
Rotate a key#
Rotation is a create and a revoke, with the switchover in between so traffic never stops:
Rotate keys without downtime covers draining traffic and rotating keys on a schedule.
Key management errors#
Authentication and authorization errors#
A 401 means Flint can't accept the credential. It has type authentication_error and a WWW-Authenticate: Bearer realm="Flint API" header. A 403 means the credential is valid but isn't allowed to make this request. It has type authorization_error. Both have remediation.retry none: fix the key or the request before you send it again.
{
"error": {
"type": "authentication_error",
"code": "INVALID_CREDENTIAL",
"message": "The API key is not recognized.",
"error_source": "caller",
"doc_url": "https://developers.withflintpay.com/docs/errors#invalid_credential",
"request_id": "req_01KWM6ZP8YBJ1T37P8QYHZNS2E",
"remediation": {
"retry": "none",
"next_steps": "Check the credential for truncation or stray whitespace, or create a new one."
},
"details": [
{
"code": "INVALID_CREDENTIAL",
"message": "The API key is not recognized.",
"reason": "unknown",
"remediation": {
"retry": "none",
"next_steps": "Check the credential for truncation or stray whitespace, or create a new one."
}
}
]
}
}
The INVALID_CREDENTIAL reasons apply to all credential types. When Flint recognizes the type, details[0].auth_type identifies it. A wrong_credential_type detail also lists accepted_auth_types, excluding first-party dashboard sessions. These facts use the extensible credential types in the prefix registry.
details[0].reason | What happened | Fix |
|---|---|---|
malformed | Flint cannot classify the credential: the scheme or token is malformed, the prefix is unknown (including flint_foo_), or an unprefixed token is not a compact JWS with an alg header. Basic auth, other schemes, and a request that also sends X-API-Key, X-Onboarding-Session-Token, or X-Developer-Session-Token land here, with param naming the header. | Send the whole key as Authorization: Bearer <key> and remove any other credential header. |
unknown | The format identifies a credential type, but no record matches it or its signature is invalid. | Check for truncation or stray whitespace, or create a new key. |
revoked | The key or grant was revoked, its sandbox was archived, the CLI authorization or context was removed, the partner app token was revoked or the credential, secret, or app that minted it was removed, or the onboarding user's merchant access ended. A partner app whose merchant revoked the install gets 403 FORBIDDEN with reason environment_grant_required instead. | Create a new live key, a test key in an active sandbox, or mint a new partner app token. |
expired | The credential is past its expiry, including CLI tokens, partner app tokens, onboarding sessions, and dashboard sessions. | Set a later expires_at or create a new key. |
mode_mismatch | A test key that isn't bound to a sandbox, a live key that is, or a key holding a scope its mode doesn't allow. | Create the key from the dashboard or a sandbox with current scopes. |
session_ended | The session has ended. | Start a new session. |
wrong_credential_type | The endpoint doesn't accept this kind of credential, such as a partner token on an endpoint that takes only API keys. | Send one of details[0].accepted_auth_types. A recognized non-bearer secret, such as a refresh token, also returns this reason. |
The reason list can grow, so treat a reason you don't recognize like unknown.
An unbound test key is the most common first-run failure. Its remediation says what to do next:
{
"error": {
"type": "authentication_error",
"code": "INVALID_CREDENTIAL",
"message": "Test mode API keys must be sandbox-bound before they can authenticate public API requests.",
"error_source": "caller",
"doc_url": "https://developers.withflintpay.com/docs/errors#invalid_credential",
"request_id": "req_01KWM60C6F6CDNQ3KSP5KRBD3V",
"remediation": {
"retry": "none",
"next_steps": "Create a key in the right mode. A test key is bound to one active sandbox, a live key is never bound to a sandbox, and a key holds only scopes its mode allows.",
"next_actions": [
{
"action_type": "issue_developer_sandbox_test_key",
"reason_code": "SANDBOX_BOUND_TEST_KEY_REQUIRED",
"reason_message": "Create or use a sandbox-bound test key for the sandbox this request should target.",
"required_fields": ["sandbox_id"]
}
]
},
"details": [
{
"code": "INVALID_CREDENTIAL",
"message": "Test mode API keys must be sandbox-bound before they can authenticate public API requests.",
"reason": "mode_mismatch"
}
]
}
}
A request rejected before Flint identifies the key, because the key is missing, malformed, unknown, revoked, or expired, leaves no entry in your request logs, so debug it from the error body. Once Flint identifies the key, the request is logged even when it fails, for example on a missing scope. See Debugging for tracing a request by its ID and Error handling for the full error object.
Keep keys on the server#
Important: Never put a key in client code
Flint has no publishable key. Every flint_ key acts as your merchant with every scope it holds. Treat a key that has shipped in browser JavaScript, a mobile app, or a public repository as leaked, and revoke it.
- Load keys from environment variables or a secrets manager, not from source.
- Give each key the fewest scopes it needs, and an
expires_atwhen the job has an end date. - If a key leaks, revoke it in the dashboard or over the API first, then deploy a replacement.
- For local work,
flint auth importfrom the CLI validates a key and stores it in your OS keychain instead of a dotfile.
Key security covers source control, webhook secrets, and what to do when a key leaks.
Other credentials#
API keys are for your server. Other flows use their own credentials, sent the same way, as Authorization: Bearer. Each one acts only where its flow needs it, and every operation's security in the reference lists what it accepts.
| Credential | Starts with | Use it for |
|---|---|---|
| Checkout credential | ckat_v1. | A checkout your backend runs for one buyer, from checkout_auth_token. See Build your own checkout. |
| Customer session secret | flint_cses_ | A signed-in buyer's own account calls under /v1/me. See Customer sessions. |
| CLI access token | fcat_ | The Flint CLI after flint login, bound to one approved context. See CLI OAuth. |
| Workload identity token | fwat_ | CI and cloud workloads that exchange an OIDC token instead of storing a key. See Workload identities. |
| Partner app token | fpat_ | A partner app acting for merchants that installed it, in one mode. It names the merchant with Flint-Merchant-Id unless it is bound to one. See Partner app installs. |
| Onboarding session token | devsess_v1. | Setting up a new account from a script or agent, in its default sandbox. POST /v1/onboarding/verify-email returns it. See API & agent onboarding. |
Authorization holds one credential, so a request sends either a checkout credential or your API key, never both. Which environment a credential reaches shows where each one acts.
Credential prefix registry#
The top-level OpenAPI extension x-flint-credential-types publishes a list of {prefix, auth_type, kind} objects. prefix is the literal beginning of the credential; auth_type identifies its class. kind is scoped_key for API keys, scoped_token for delegated CLI, workload and partner access, user_session for signed-in onboarding sessions, buyer for credentials bound to a buyer flow, or non_bearer for secrets that cannot authenticate a request in Authorization.
prefix | auth_type | kind |
|---|---|---|
flint_live_ | api_key | scoped_key |
flint_test_ | api_key | scoped_key |
fcat_ | cli_login | scoped_token |
fwat_ | workload_identity | scoped_token |
fpat_ | partner_app | scoped_token |
devsess_v1. | onboarding_session | user_session |
ckat_v1. | checkout_session | buyer |
cklt_v1. | checkout_launch | buyer |
flint_cses_ | customer_session | buyer |
ivt_ | invoice_access | buyer |
fcrt_ | cli_refresh | non_bearer |
flint_cref_ | customer_refresh | non_bearer |
fcdc_ | cli_device_code | non_bearer |
ckse_v1. | checkout_stored_secret | non_bearer |
plrc_v1. | payment_link_resolution | non_bearer |
A CLI refresh token renews a CLI login. A customer refresh token renews a customer session, and a CLI device code completes device authorization. Stored checkout secrets and payment link resolution tokens belong to their checkout flow. None is an access token. Prefixes identify the type before validation; they do not prove that a credential is authentic or active. A known type on a route that never accepts it returns 401 INVALID_CREDENTIAL with wrong_credential_type. An accepted type in the wrong mode returns 403 FORBIDDEN with live_mode_required or test_mode_required.
Workload identities#
If your CI runner or cloud workload can get an OIDC token, exchange it for a short-lived Flint token instead of storing a Flint key. A workload identity (wid_...) names the issuer, audience, subject, and claim conditions Flint accepts, and the scopes the token gets. Each identity belongs to one environment: live, or one sandbox.
- Create the identity with a credential that holds
accounts.workload_identities.write. API key management scopes don't cover workload identities. - In the workload, send the issuer's token and the
workload_identity_idtoPOST /v1/oauth/tokenwithgrant_type=urn:ietf:params:oauth:grant-type:token-exchange. - Send the returned
fwat_token asAuthorization: Bearer. It lasts at most one hour, and never longer than the OIDC token you exchanged. Deactivating, archiving, or narrowing the identity takes effect on the next request.
On GitHub Actions, the setup-flint action does steps 2 and 3 for you; see Run in CI. The CLI and SDKs also exchange the token themselves when FLINT_WORKLOAD_IDENTITY_ID is set. Workload identities has a recipe for each platform.
Workload identity token exchange has the request and response. OAuth clients can find the token endpoint, supported grants, and Flint's public signing keys without a credential; see OAuth discovery and signing keys.