QR code
WebSocket
Real-time QR code challenge management via WebSocket connections
WSS
Connection
Connect to the WebSocket endpoint for the region of your Tenant.Authentication
To authenticate with the WebSocket API, include the required values in theSec-WebSocket-Protocol header:
authsignal-ws- identifies the Authsignal WebSocket sub-protocol.- Exactly one of the following, depending on the type of challenge you are creating:
x.authsignal.tenant.<your-tenant-id>- use when the challenge is anonymous (user is not known yet).x.authsignal.token.<token-from-track>- use when the challenge is for a known user; supply the token returned by the track request.
Message Flow
The WebSocket communication follows this pattern:- Client connects to the WebSocket endpoint
- Client sends
CREATE_CHALLENGEmessage to initiate a challenge - Server responds with
CHALLENGE_CREATEDconfirmation - Server sends
STATE_CHANGEmessages as the challenge progresses through states
Challenge States
Challenges progress through the following states:unclaimed- Challenge created but not yet claimed by a user (This state will not be included in the state change messages)claimed- User has claimed the challenge on their deviceapproved- User has approved the challengerejected- User has rejected the challenge

