Skip to content
Trustaige Docs

Countersign

Ask for a countersignature

post /countersign/bc-authorize

Ask the signed-in person to countersign one action before your app carries it out. Call it from your server when the change comes in, and store auth_req_id and txn_hash with the pending change. The request follows OpenID CIBA poll mode, with the action in RFC 9396 authorization_details.

Authentication

Your app's own client authentication, exactly as at POST /oauth2/token: its client ID and secret with HTTP Basic or in the body, or a private_key_jwt assertion. A public client can't call it.

Body application/x-www-form-urlencoded

  • login_hint string required

    The sub your app received for the person when they signed in.

  • authorization_details string required

    The action, as a JSON array of entries (RFC 9396): each a type, an optional summary, fields of name, title, value and optional format, and an optional notice. Up to 32 KB.

  • binding_message string

    Up to 140 characters. The headline when no entry has a summary.

  • frame_origin string required

    The origin of the page that opens the Trustaige window, which must be the origin of one of the app's redirect URIs. Send it always: the admin can change the app's method at any time, and an app set to Phone ignores it.

  • nonce string

    Echoed in the proof.

Responses

  • 200 The person is being asked. For Passkey, open frame_url on your page; for Phone, show binding_code.
    Show response fields
    • auth_req_id string required

      The request. Collect its proof with it, and check it against the proof's jti.

    • expires_in integer required

      Seconds until the request ends: 300 for Passkey, 180 for Phone.

    • interval integer required

      Seconds to wait between polls of POST /countersign/token.

    • method string required

      How the person countersigns, as the organization's admin set it for the app.

      One of same_device_passkey , phone_approval

    • frame_url string

      Passkey only. Hand it to TrustaigeCountersign.open from /countersign.js.

    • binding_code string

      Phone only. Show it beside your own "Approve on your phone"; the person picks the same code on their phone.

    • txn_hash string required

      The value the proof's txn_hash will carry. Store it with the pending change.

  • 400 The request can't be asked.
  • 401 Your app didn't authenticate as a confidential client.
  • 429 This person has been asked on their phone too often.

Errors

Errors come back as an error to branch on. What each means and what to do:

Status Code What to do
401 invalid_client Authenticate as the app, with its secret or key. A public client can't ask.
400 unauthorized_client Countersign is off for the app, or the app isn't one the organization runs itself. An admin turns it on in the app's Countersign tab.
400 unknown_user_id login_hint isn't the sub of someone with access to the app's organization.
400 invalid_authorization_details The action isn't in the shape Countersign shows. error_description names the entry and field.
400 invalid_binding_message binding_message is longer than 140 characters.
400 invalid_request frame_origin isn't the origin of one of the app's redirect URIs.
400 phone_approval_unavailable The app is set to Phone, and the person hasn't set up Trustaige Identity, or Phone isn't available to the organization. Trustaige never switches to the passkey instead.
400 access_denied The person recently reported a request as not theirs, so requests to them are paused for a few minutes.
429 rate_limited Phone requests to one person are limited to 10 in 10 minutes.