Cookie Auth - POST /api/sn\_webrtc/webrtc\_cookie\_auth/cookie\_auth

reference australia Updated Oct 14, 2026 3 min read cookieauth-POST-cookie_auth.md
Raw file servicenow.com

Returns a short-lived ticket that the WebRTC phone widget uses to connect to the voice service and start a call. The endpoint doesn’t require login, so guest users can place calls.

URL format

Default URL: /api/sn_webrtc/webrtc_cookie_auth/cookie_auth

Trusted orchestrator domains

The Cookie Auth POST endpoint creates a ticket only when the orchestrator_host value matches a domain in the following system property, or is a subdomain of one of those domains. If the property is empty, the endpoint uses the default domain, sncapps.service-now.com.

Property

Description

Default value

sn_webrtc.orchestrator.trusted_domains

Comma-separated list of trusted domains. A host is trusted when it equals one of the domains or is a subdomain of one of them. Only users with the maint role can change this property.Data type: String

sncapps.service-now.com

## Supported request parameters
Name Description
None
Name Description
None

Name

Required

Description

voice_service_id

Required

The sys_id of the voice service configuration. The value must pass the platform sys_id check and must also be exactly 32 lowercase hexadecimal characters.Data type: String

Format: 32 lowercase hexadecimal characters

Maximum length: 256

orchestrator_host

Required

The host name of the voice orchestrator, as a bare host name or an https:// URL. The endpoint rejects http:// URLs and values that include a port, path, query string, or credentials. The host must match a trusted domain exactly or be a subdomain of a trusted domain. For information about trusted domains, see the Trusted orchestrator domains section.

Data type: String

Maximum length: 256

instance_name

Required

ServiceNow instance identifier.Format: [a-z0-9][a-z0-9-]{0,62} (max 63 characters)

Data type: String

## Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.

Header

Description

Accept

Data format of the request body. Supported types: application/json or application/xml. Default: application/json

Content-Type

Required. Must be application/json. The endpoint rejects any other content type with a 400 status code.

X-UserToken

Required. The session CSRF token for the current session. The endpoint rejects requests with a missing or incorrect token.

|Header|Description| |------|-----------| |None| |

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.

Note: See the 'API rate limits' section Cookie Auth API for issues around rate limiting.

Status code

Description

200

Successful. The request was successfully processed.

400

Bad Request. The request wasn't valid. Possible causes include a missing or invalid parameter, a content type other than application/json, a request body larger than 2,048 bytes, or an orchestrator host that isn't trusted. The response doesn't identify which check failed due to a security constraint.

Response body: {"error": "Bad Request"}

502

Bad Gateway. The instance couldn't get a ticket from the voice orchestrator.

Response body: {"error": "Bad Gateway"}

## Response body parameters \(JSON\)

Name

Description

ws_ticket

Ticket that the client uses to open the WebSocket connection to the voice orchestrator. The ticket expires after 60 seconds and can be used only once.Data type: String

## cURL request

The following example demonstrates how to use the POST endpoint to request a ticket for a voice service. The request includes the session CSRF token header.

Shell
curl "https://instance.service-now.com/api/sn_webrtc/webrtc_cookie_auth/cookie_auth" \        --request POST \        --header "Accept: application/json" \        --header "Content-Type: application/json" \        --header "X-UserToken: session_csrf_token" \        --data "{\"voice_service_id\": \"0123456789abcdef0123456789abcdef\", \"orchestrator_host\": \"https://myservicenoworchestrator.sncapps.service-now.com\"}"

Response body. The response contains the ticket.

JSON
{        "ws_ticket": "ticket_value"        }

Parent Topic:Cookie Auth API

Search documentation
Search document titles and file paths on the australia branch