Skip to content

Create WebSocket Ticket

A WebSocket connection must first exchange the access token for a one-time wsTicket through this REST endpoint.

Endpoint

http
POST /wlte/v1/ws/ticket

Purpose

Use the access token to create a one-time wsTicket.

The client must obtain a wsTicket first and then use that ticket to establish the WebSocket connection.

text
accessToken -> wsTicket -> WebSocket authenticated session

Request

Full URL:

http
POST {baseUrl}/wlte/v1/ws/ticket

Request headers:

http
Authorization: Bearer {accessToken}
Content-Type: application/json
Accept: application/json

Request body:

json
{}

Success Response

HTTP status:

text
200 OK

Response body:

json
{
  "code": "SUCCESS",
  "message": "OK.",
  "requestId": "req_001",
  "data": {
    "ticket": "wst_01HX...",
    "expiresIn": 60
  }
}

Response data Schema

FieldTypeRequiredDescription
ticketstringYesOne-time WebSocket connection credential
expiresInintegerYesTicket lifetime, in seconds

Ticket Rules

  • A wsTicket can only be used once
  • A wsTicket is only used to establish a WebSocket connection and is not used for REST API calls
  • A wsTicket expires after expiresIn if it is not used
  • The ticket lifetime never exceeds the remaining lifetime of the access token used to create it
  • The wsTicket becomes invalid immediately after a successful connection is established
  • If connection establishment fails, the client must call this endpoint again to obtain a new ticket

Error Responses

Possible responses:

  • 400 INVALID_REQUEST
  • 401 AUTH_REQUIRED
  • 401 AUTH_INVALID
  • 401 AUTH_EXPIRED
  • 429 RATE_LIMITED
  • 500 INTERNAL_ERROR

Continue Reading

Docs buildVersion v1.2.19-20260602-174859-60
Copyright © 2026 WLTE