Skip to content
Trustaige Docs

Countersign

Collect the proof

post /countersign/token

Poll for the person's answer, no faster than interval seconds. When they countersign, the answer is the proof, which can be collected once. Check every claim before you apply the change.

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

  • auth_req_id string required

    The auth_req_id from POST /countersign/bc-authorize.

Responses

  • 200 The person countersigned. Check the proof, then act.
    Show response fields
    • verification_proof string required

      The proof: a JWT with header typ verification+jwt, valid for two minutes from the person's answer. Check every claim before you act.

    • token_type string required

      One of verification+jwt

  • 400 No proof yet, or none to give.
  • 401 Your app didn't authenticate as a confidential client.

Errors

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

Status Code What to do
400 authorization_pending The person hasn't answered yet. Poll again after interval seconds.
400 slow_down You polled faster than interval. Wait longer between polls.
400 access_denied The person declined, picked the wrong code, or reported it as not theirs. Don't apply the change.
400 expired_token Nobody answered before the request ended. Ask again if the person still wants the change.
400 invalid_grant The proof was already collected, or the request is another app's. Don't apply the change.
401 invalid_client Authenticate as the app, with its secret or key.