API keys

The keys your server uses to call the Touchque API: create, rotate and revoke them, and see how much each one is used.

Your server signs every call to the 2FA API with an API key (its key ID) and the key's secret. API keys is where you create keys, see who created each one and how much it is used, and rotate or revoke one.

The secret is shown only once, right after you create or rotate a key. Keep it on your server and never put it in client-side code. If you lose it, rotate the key to get a new one.

Touchque Login apps have their own client ID and secret on their own page (Login setup); they do not use these keys.

In the dashboardCustomers → 2FA API → API keysdashboard.touchque.com/api-info

Permissions

  • Developers who connect a server to the Touchque API.
  • Every member sees every key in the organization and its usage. Only owners and admins can create, rotate and revoke keys. Each of these needs two-step verification on your account and an approval on your phone.

Create an API key

  1. Open Customers → 2FA API → API keys.
  2. Press Create API key.
  3. Choose the Expiration: 30 days, 90 days, 1 year or Never.
  4. Optional: in IP allowlist, type the IP addresses allowed to use the key, comma separated.
  5. Press Create API key and approve on your phone: choose the number the dashboard shows in Touchque Authenticator.
  6. Copy the Key ID and the Secret (or the ready Quickstart snippet), then press I've saved it.

If two-step verification is off on your account, the dashboard asks you to turn it on first. With no key yet, the page opens on the 2FA API setup guide.

One active key limit

  1. Each member can hold one active key per organization. While you have one, Create API key is hidden.
  2. To get a new secret, press Rotate on your key.
  3. To start over, press Revoke on your key, then create a new one.

Other owners and admins can each hold their own key.

Rotate a key or get a new secret

  1. On API keys, press Rotate on the key.
  2. Confirm with Rotate key and approve on your phone.
  3. Copy the new Key ID and Secret, update your server, then press I've saved it.

The old key stops working at once. The new key gets a new key ID and secret but keeps the name, expiry date and IP allowlist, and it stays its creator's key, whoever rotates it.

Revoke a key

  1. On API keys, press Revoke on the key.
  2. Confirm with Revoke key.
  3. Approve on your phone.

Calls with the key fail at once, and this cannot be undone. Revoked keys with no calls in the last 14 days are folded under Revoked keys.

Key statuses: Expired, Creator left, Rotation needed

  1. Expired: the key passed its expiry date and every call with it is refused. It cannot be rotated: revoke it, then create a new key.
  2. Creator left: the member who created it is no longer in the organization, so every call with it is refused. Revoke it, then create a new key.
  3. Rotation needed: rotate the key to get a new secret.

See key usage

  1. On API keys, each key shows its API calls over the last 14 UTC days, its approval rate and when it was last used.
  2. Press See all usage on a key to open the Usage page for that key over the same days.
  3. Press View usage for every key together.

Settings reference

API keys

SettingDescription
StatusActive, Revoked, Expired or Creator left; Rotation needed when a new secret is due.
Key IDShown masked. The copy button copies the key ID, never the secret.
Created, Expires, allowed IPsWhen and by whom the key was created, its expiry date, and how many IP addresses may use it.
UsageAPI calls over the last 14 UTC days against the 14 days before, approved share of requests, and Last used.
Rotate, RevokeOwners and admins only. Both need your phone approval.

Create API key

SettingDescription
Expiration30 days, 90 days, 1 year or Never (default). The key stops working once it expires.
IP allowlistComma-separated IP addresses allowed to use this key. Empty allows any IP. Each address must match exactly; a call from any other address is refused with 403.

API key created

SettingDescription
Key IDThe public half: sent as x-api-key.
SecretShown only in this dialog. It can't be shown again after you close it.
QuickstartA ready-to-paste snippet with the key included, in the language you pick.

Limits

  • One active key per member per organization.
  • The secret is shown once, when the key is created or rotated.
  • The IP allowlist takes exact addresses and is set when the key is created; rotating keeps it.
  • A key stops working when it expires or when its creator leaves the organization; neither can be fixed by rotating.
  • If two-step verification was turned on for your account recently, creating and rotating keys is refused for a while (the message says until when). Revoking is never delayed.

See also

  • Webhooks: Where Touchque sends the result of every login request (approved or rejected) and the follow-up events, as a signed POST to your server.
  • Usage: Every number of the 2FA API in a time window: sign-in requests by outcome, API calls per key and endpoint, time to approve, security events, offline and passkey activity, and webhooks.
  • End users: The people who sign in to your own app and approve with Touchque Authenticator through the 2FA API: their status, phone, secrets, passkeys and recent requests.
  • Login setup: Set up Touchque Login, the hosted sign-up and sign-in pages for your own customers: the apps that use them, social and company sign-in, branding, security, your own domain and the emails.

API and SDKs