Create a browser action
Creates a single-use link to one of the project’s trusted origins that, when opened, makes the Hexclave SDK on that page perform an action in the browser: signing in as a given user (impersonation) or showing the clickmap overlay. Requires server or higher access.
Body
The action the SDK performs after the link is opened. impersonation signs the browser in as user_id; clickmap-overlay mounts the clickmap overlay.
impersonation, clickmap-overlay "impersonation"
The project's trusted origin where the link opens. The action can only be consumed by a request whose Origin header matches this value.
"https://app.example.com"
How long the single-use link remains redeemable, in milliseconds.
300000
Lifetime of the impersonation session, measured from link creation. Ignored for clickmap-overlay actions.
7200000
ID of the user to impersonate. Required when type is impersonation and ignored for clickmap-overlay.
"user_123"
Response
Successful response
Opaque, single-use browser action ID.
"browser_action_code"
URL at the requested trusted origin containing the browser action ID. Open it in the target browser to perform the action.
"https://app.example.com/?hexclave_action_id=browser_action_code"
Unix timestamp in milliseconds after which the browser action can no longer be consumed.
1800000000000