Endpoint
If you use a custom Gateway API base URL, replace only the origin:
POST https://your-gateway-api.example.com/api/v1/wa/embedded-signup/sessionsKeep the /api/v1/wa/embedded-signup/sessions path unchanged. Your backend base URL should point to the same Gateway environment as the SDK’s apiBaseUrl.string
required
Secret API key in
Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx format.string
required
Always
application/json.The recommended integration never calls this endpoint from the browser. Your backend calls it using the secret key (see Backend Integration), and the SDK calls your backend through
fetchSessionToken.The SDK can call the Session API directly only when you explicitly pass secretKey to launch(). This is intended as a development fallback and should not be used in production because it exposes the secret key in the browser.Response / Success (HTTP 200)
data object to fetchSessionToken:
data. The SDK automatically reads the compact gh, wv, pt, li, and bn fields.
Errors
A failed request returns a non-2xx status with an error body, for example when the secret key is invalid:fetchSessionToken implementation can read the error description and throw it so the SDK can show the error modal and deliver the error through onError. See Backend Integration.