Server SDKs
The server SDKs wrap the server REST API and event callbacks: a few lines on your server manage users, friends, groups and chat rooms, send and query messages, issue sign-in tickets, and receive callbacks safely. They handle these error-prone details for you:
- App Token: fetched and cached automatically with the Client ID and Client Secret, and fetched again before it expires or becomes invalid, with nothing for you to manage.
- Retries and rate limits: network errors,
5xxand429 rate_limitedare retried automatically with backoff, and only requests that are safe to retry are retried. - Paging and batch results: iterators that page automatically, and typed results for every item of batch APIs.
- Errors: errors carry the server's
codeanddetailsso you can check them directly (Python also has exception subclasses by category). - File uploads: creating the upload, uploading the content (split into parts automatically for large files) and completing it, in one call.
- Receiving callbacks: verifying signatures, preventing replay, de-duplicating by event ID, and dispatching event callbacks and sync callbacks to your handlers.
Available languages
| Language | Package | Runtime | Docs |
|---|---|---|---|
| Go | github.com/DeepRespond-AI/deeprespond-im-server-go-sdk@v1.0.3 (package drim) | Go 1.23 or later, standard library only | Go SDK, Demo |
| Python | PyPI deeprespond-im-server-sdk==1.0.0a2 (import name deeprespond_im) | Python 3.11 or later, with sync and async APIs | Python SDK, Demo |
| Java / Spring Boot | Maven Central cn.deeprespond:im-server-sdk:1.0.0-alpha.3 | Java 17 or later, Spring Boot 3.5 | Java SDK, Demo |
| Node.js / TypeScript | npm @deeprespond/im-server-sdk@1.0.7 | Node.js 22.17 or later, ES modules and CommonJS, no runtime dependencies | Node.js SDK, Examples |
All four languages follow the same rules for tokens, retries, paging and callback verification, with naming and error types in each language's own style. Go can also use the source package and demo in its download instructions, and Node.js can also be packed and installed from local source. User sign-in, persistent connections and conversation sync belong to the separate Go client SDK.
All four languages support streaming replies in AI conversations (from Go v1.0.2, Python 1.0.0a1, Java 1.0.0-alpha.2 and Node.js 1.0.6): when a user's message to a bot arrives, start a reply with StartStream, and connect OpenAI, Anthropic and Gemini streams directly with Pipe*. See "AI streaming replies" in each language's "Calling the API".
All four languages support the server API and callback events of game rooms (from Go v1.0.3, Python 1.0.0a2, Java 1.0.0-alpha.3 and Node.js 1.0.7): create rooms, issue join tickets, start, end and remove players. See Game rooms: server API.
Before you start
- Server side only: the Client Secret and App Token are as powerful as the app administrator's password, so never put them in browsers, apps or mini programs. For clients, use a client SDK such as the Web SDK.
- One client per app: a client is created with the API address,
org_name,app_name, Client ID and Client Secret, and only calls that app's APIs. To manage several apps, create a client for each. - Reuse it across the process: a client can be used by many threads or coroutines at once, sharing the App Token, connection pool and rate-limit waits, so create one at startup instead of one per request.
- API parameters and meaning are defined by the server REST API. SDK methods map one-to-one to REST APIs, and each language's "Services and methods" page lists the mapping.
Next steps
- Go SDK: install, create a client, Calling the API, Receiving callbacks, Services and methods, Demo guide
- Python SDK: install, create a client, Calling the API, Receiving callbacks, Services and methods, Demo guide and download
- Java / Spring Boot SDK: install, configure, AI streaming replies, server example
- Node.js SDK: Quickstart, client config, Calling the API, Receiving callbacks, Services and methods, Examples guide, FAQ, Release notes
Standalone RTC channels
All four languages provide a service for managing standalone RTC channels (client.Channels in Go, im.channels() in Java, client.channels in Node.js and Python): creating, querying, updating and closing channels, issuing and revoking tickets, querying sessions, acting on members, and querying stats and usage corrections. Users join channel audio and video from the client; the server SDKs can't do that for them.
Before integrating, check that your installed version includes these APIs. If you previously passed channel parameters as Go json.RawMessage, or read channels through the generic result types in Node.js or Python, switch to the dedicated channel types; see each language's "Calling the API" and "Services and methods".
