--- title: Cookie Auth - POST /api/sn\_webrtc/webrtc\_cookie\_auth/cookie\_auth description: 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. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/rest-apis/cookieauth-POST-cookie\_auth.html release: australia product: REST APIs classification: rest-apis topic_type: reference last_updated: "2026-10-14" reading_time_minutes: 3 breadcrumb: [Cookie Auth API, REST API reference, API reference, API implementation and reference] --- # Cookie Auth - POST /api/sn\_webrtc/webrtc\_cookie\_auth/cookie\_auth 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).
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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md). **Note:** See the 'API rate limits' section [Cookie Auth API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cookieauth-api.md) 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. ``` 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. ``` { "ws_ticket": "ticket_value" } ``` **Parent Topic:**[Cookie Auth API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cookieauth-api.md)