Socket
WebSocket Connection Details
The itsochvts.com
Socket API allows for real-time communication using WebSocket technology. Below are the details and implementation methods for connecting to the socket.
Connection Details
- Base URL:
wss://itsochvts.com/api/socket
- Authentication: Requires a valid session cookie (
JSESSION
) for receiving relevant responses.
Implementation Methods
There are two ways to authenticate and use the socket:
1. Basic Authentication
- Use your credentials to authenticate via Basic Auth.
- After successful authentication, a session cookie (
JSESSION
) will be generated. - Use this cookie to establish the WebSocket connection.
2. Cookie-Based Authentication
- If you already have a valid session cookie (
JSESSION
), you can directly use it to connect to the WebSocket. - Ensure the cookie is included in the request headers for the WebSocket handshake.
Example Workflow
- Generate Cookie Using Basic Auth:
- Send a request to the authentication endpoint with your credentials.
-
Extract the
JSESSION
cookie from the response. -
Establish WebSocket Connection:
- Use the
JSESSION
cookie in the WebSocket handshake request. - Connect to the WebSocket endpoint:
wss://itsochvts.com/api/socket
.
By following this approach, you can seamlessly integrate with the itsochvts.com
Socket API for real-time communication.