Palbase Auth API · API
/auth/transactions/{id}/approveApprove a transaction with a device signature
Approves a pending transaction with an App Attest assertion from one of the user's verified devices, and returns a short-lived approval token (15 minutes) naming the transaction. The device calls generateAssertion(keyId, clientDataHash) with clientDataHash = SHA-256 of the challenge from the create answer, and sends the returned authenticator data and signature; the server supplies the clientDataHash from the stored challenge, so an assertion made for another transaction does not verify, and the assertion's signature counter must exceed the last one the device used. A refused proof (bad signature, replayed or older counter, a device that is not the user's or not verified) answers 403 signature_invalid, not 401; after 5 of them approvals are locked for 30 minutes: 429 transaction_locked with Retry-After. Authenticator data that is not 37 bytes answers 400 invalid_authenticator_data. A project hook may deny the approval (403 hook_denied, and the transaction becomes denied). An expired challenge answers 410 and marks the transaction expired; a transaction that is no longer pending answers 409.
Called by a signed-in user of your app, with their token and the publishable key.
Path
idstring · requiredTransaction ID (`tx_…`).Request body
authenticator_datastring (byte) · requiredThe assertion's authenticator data (37 bytes: rpIdHash, flags, signature counter), base64.device_idstring · requiredDevice ID (`dev_…`) of one of the user's verified devices.device_signaturestring (byte) · requiredThe assertion's ECDSA signature over SHA-256(authenticator_data ‖ SHA-256(challenge)), ASN.1 DER, base64.curl -X POST "https://<your-ref>.palbase.studio/auth/transactions/<id>/approve" \
-H "apikey: $PALBASE_PUBLISHABLE_KEY" \
-H "authorization: Bearer $USER_ACCESS_TOKEN" \
-H "content-type: application/json" \
-d '{"authenticator_data":"string","device_id":"string","device_signature":"string"}'Responses
200Transaction approved
400Validation failed or required field missing
401Missing, invalid, or expired credentials
403Authenticated but not permitted (banned, hook denial, role mismatch)
404Resource does not exist or is not visible to the caller
409Conflict with current resource state (duplicate, race)
410The transaction's challenge expired; the transaction is now `expired` (`transaction_expired`).
429Approvals are locked after 5 refused proofs (`transaction_locked`).
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation ApproveTransaction of auth's contract.