Skip to main content
GET

Overview

Get the IM connection address for users, including TCP, WebSocket, and WebSocket Secure addresses.

Query Parameters

integer
default:0
Whether to return intranet address
  • 0 - Return external network address
  • 1 - Return internal network address

Response Fields

string
required
TCP connection address, format: host:port
string
required
WebSocket connection address, format: ws://host:port
string
required
WebSocket Secure connection address, format: wss://host:port

Status Codes

Use Cases

Client Connection Setup

Dynamic Connection Discovery:

Load Balancing

Multiple Server Discovery:

Environment-based Connection

Internal vs External Network:

Connection Failover

Automatic Failover:

Mobile App Integration

Platform-specific Connection:

Best Practices

  1. Connection Type Selection: Choose appropriate connection type based on environment (HTTP/HTTPS)
  2. Failover Strategy: Implement failover mechanism for high availability
  3. Network Detection: Detect internal vs external network for optimal performance
  4. Connection Testing: Test connectivity before establishing full connection
  5. Caching: Cache connection addresses to reduce API calls
  6. Error Handling: Handle network errors gracefully with retry logic
  7. Security: Use secure connections (WSS) in production environments