Widget IDs and widget status for console and QR code flows
The end-to-end and age gate widgets now return a widgetId, so a server can learn the outcome of a flow the player finished on another device, such as a phone that scanned a QR code shown on a console. Until now that result only came back through a DOM event or a redirect, and a console can receive neither.
What's new
widgetIdin the widget URL response./widget/generate-e2e-urland/widget/generate-age-gate-urlreturn awidgetIdnext tourlandshortUrl. Store it against your player.- Widget status endpoint.
GET /widget/get-statusreturns one widget's outcome:PENDING,PASS,IN_CHALLENGE,FAILED,PROHIBITED, orEXPIRED.POST /widget/get-statusreads up to 100 widgets at once. Once a widget reportsPASS, it keeps reportingPASS. widgetIdonChallenge.StateChange. A challenge started from one of these widgets now carries thewidgetIdin its webhook.
Compatibility
All changes are additive, and existing fields keep their meaning. If you generate a client from the OpenAPI specification, the response types of /widget/generate-e2e-url and /widget/generate-age-gate-url are now named GenerateE2EUrlResponse and GenerateAgeGateUrlResponse, each adding widgetId to the previous shape.
Documentation
- Getting the widget result on your server: the statuses, polling, and webhooks.
Challenge.StateChangeevent reference