Skip to main content
Confirms an authenticator app with its current code. Call it after Begin TOTP enrollment. When this call succeeds, two-factor authentication is on.

Operation Type (for Signing)

Request Body

FieldTypeNeedDescriptionExample
”account”stringrequiredUser’s wallet address42trU9A5…
“signature”stringrequiredCryptographic signature5j1Vy9Uq…
“timestamp”integerrequiredCurrent timestamp in milliseconds1716200000000
”enrollment_id”stringrequiredEnrollment ID (UUID) from Begin TOTP enrollment8f14e45f-ceea-467a-9575-0b3a8d6c3f1e
”code”stringrequiredThe authenticator app’s current code. Exactly 6 digits. Not part of the signed payload123456
”expiry_window”integeroptionalSignature expiry in milliseconds30000
Sign this request with the account’s own key. Agent wallets cannot sign it. The account must be a main account. This call needs no proof. Begin TOTP enrollment already checked it.
  • If the code is wrong, the enrollment stays open. Try again.
  • After 5 wrong codes, the enrollment ends. Start again.
  • After 10 minutes, the enrollment expires. Start again.
The code that you send is used up. Wait for the next code before you send your first proof.

Signing

Sign enrollment_id as the data object. Do not sign code. For the request above, the message to sign is:

Response

  • Status 200: Authenticator app added
Pacifica shows recovery keys only once. Store them somewhere safe.
  • Status 400: Invalid request parameters or signature
  • Status 401: The code is wrong, or the enrollment is unknown, expired, or ended
  • Status 403: The account is a subaccount, or it does not exist
  • Status 422: A factor change ended this enrollment (two-factor settings changed. Start again.), or the account has no room for another factor
  • Status 500: Internal server error
  • Status 503: The two-factor service is unavailable. Retry later

Code Example (Python)