New Ory Agent Security is now live! Claim your complimentary test drive. Get Started!

Skip to main content

Manage API keys in Ory Talos Secure API Keys

info

Ory Talos Secure API Keys on Ory Network is in preview. The HTTP API is versioned v2alpha1, and request and response shapes can change. Pin the version of the Ory SDK that you use.

Ory Talos Secure API Keys issues and verifies the API keys that your customers use to call your API. The pages in this section show how to manage those keys on Ory Network over their lifetime: issue, view, edit, rotate, revoke, and import them. You can do each task in the Ory Console, or through the HTTP API and the Ory SDK.

Tasks at a glance​

The Ory Console pages for these tasks are in the API Keys section of the project navigation. All API paths are relative to https://$PROJECT_SLUG.projects.oryapis.com. The SDK methods belong to ApiKeysApi in the TypeScript SDK (@ory/client). In the Go SDK (github.com/ory/client-go), the service is ApiKeysAPI and each method name starts with an uppercase letter, for example AdminIssueApiKey.

TaskOry ConsoleHTTP APISDK method
Issue a keyKeys page, Create API keyPOST /v2alpha1/admin/issuedApiKeysadminIssueApiKey
List keysKeys pageGET /v2alpha1/admin/issuedApiKeysadminListIssuedApiKeys
View a keyKeys page, row menu, View detailsGET /v2alpha1/admin/issuedApiKeys/{key_id}adminGetIssuedApiKey
Edit a keyKey detail page, Save changesPATCH /v2alpha1/admin/issuedApiKeys/{key_id}adminUpdateIssuedApiKey
Rotate a keyKeys page, row menu, RotatePOST /v2alpha1/admin/issuedApiKeys/{key_id}:rotateadminRotateIssuedApiKey
Revoke a keyKeys page, row menu, RevokePOST /v2alpha1/admin/issuedApiKeys/{key_id}:revokeadminRevokeIssuedApiKey
Import a keyImported page, Import keyPOST /v2alpha1/admin/importedApiKeysadminImportApiKey
Import up to 1,000 keysAPI onlyPOST /v2alpha1/admin/importedApiKeys:batchCreateadminBatchCreateImportedApiKeys
List imported keysImported pageGET /v2alpha1/admin/importedApiKeysadminListImportedApiKeys
View an imported keyImported page, row menu, View / EditGET /v2alpha1/admin/importedApiKeys/{key_id}adminGetImportedApiKey
Edit an imported keyImported key detail page, Save changesPATCH /v2alpha1/admin/importedApiKeys/{key_id}adminUpdateImportedApiKey
Revoke an imported keyImported page, row menu, RevokePOST /v2alpha1/admin/importedApiKeys/{key_id}:revokeadminRevokeImportedApiKey
Delete an imported keyImported page, row menu, DeleteDELETE /v2alpha1/admin/importedApiKeys/{key_id}adminDeleteImportedApiKey
Test verificationPlayground page, VerifyPOST /v2alpha1/admin/apiKeys:verifyadminVerifyApiKey
Test token derivationPlayground page, Derive tokenPOST /v2alpha1/admin/apiKeys:deriveadminDeriveToken

Active key limit​

The number of active API keys in a project depends on the plan, and issued and imported keys both count toward it. A project on the Develop plan can hold up to 50 active keys, and a project on the Production plan up to 1,000. The Growth and Enterprise plans have no fixed limit. See Ory pricing.

  • Expired keys count toward the limit until you revoke them. You can also delete expired imported keys.
  • Revoking a key frees its slot. Rotating a key doesn't change the count.
  • When the project reaches the limit, issuing or importing a key fails with HTTP 402.

To find expired keys, compare the expire_time of each key with the current time. In the Ory Console, check the Expires column.