Skip to main content
Documentation
StartOverviewArchitectureAuthenticationSend your first message
TypeScript SDKOverviewTrusted app serverApp-user clientsRealtimeErrors & webhooks
Flutter SDKOverviewInstallationAuthenticationChannels & messagesOffline & syncRealtimeUI componentsPush & lifecycle
ConceptsTenancy & scopeChannels & messagesDelivery & reconciliationSecurity checklist
ProtocolsRealtimeSigned webhooks
ReferenceREST APIErrors, limits & retriesDeploy docs to Coolify
VV ChatDocs API v1
Recommended starting points
Build chat without rebuilding infrastructureV Chat is a multi-tenant messaging backend with typed server, web, and Flutter integration paths.StartArchitecture at a glanceUnderstand the control plane, data plane, realtime path, and SDK boundaries before integrating.StartAuthentication and credentialsSelect the correct credential for dashboard, trusted-server, app-user, realtime, and webhook flows.StartSend your first messageUse the trusted TypeScript server client to create the minimum safe messaging flow.StartTypeScript SDK overviewChoose the correct typed client for trusted servers, app users, dashboard sessions, realtime, and webhooks.TypeScript SDKTrusted app-server clientUse AppServerClient from a protected backend to manage data-plane resources and mint app-user tokens.TypeScript SDKApp-user clientsBuild browser or Node app-user flows with VChatClient or the lower-level AppUserClient.TypeScript SDK
↑↓ Navigate↵ Openesc Close
API reference
StartOverviewArchitectureAuthenticationSend your first message
TypeScript SDKOverviewTrusted app serverApp-user clientsRealtimeErrors & webhooks
Flutter SDKOverviewInstallationAuthenticationChannels & messagesOffline & syncRealtimeUI componentsPush & lifecycle
ConceptsTenancy & scopeChannels & messagesDelivery & reconciliationSecurity checklist
ProtocolsRealtimeSigned webhooks
ReferenceREST APIErrors, limits & retriesDeploy docs to Coolify
Contract sourceOpenAPI JSON
Docs/TypeScript SDK
End-user session

App-user clients

Build browser or Node app-user flows with VChatClient or the lower-level AppUserClient.

Updated 2026-08-09•packages/sdk-typescript/src/client/v-chat-client.ts · app-user-client.ts · SDK README

VChatClient or AppUserClient?

Choose VChatClient when one object should own app-user REST, realtime lifecycle, recovery, and channel handles. Choose AppUserClient when you want only the lower-level REST facades and will own lifecycle composition yourself.

Create a lower-level app-user client

ts
import { AppUserClient } from '@vchatsdk/sdk-typescript';

const appUser = new AppUserClient({
  baseUrl: 'https://api.example.com',
  userId: currentUserId,
  tokenProvider: fetchCurrentUserChatToken,
});

const conversations = await appUser.conversations.query({ limit: 25 });
const unread = await appUser.conversations.getUnreadSummary();

Messages and read state

ts
const sent = await appUser.messages.send(
  'messaging',
  'support-123',
  { text: 'Can you help with my account?' },
  { messageId: crypto.randomUUID() },
);

await appUser.channels.markRead(
  'messaging',
  'support-123',
  sent.data.message.messageId,
);

The SDK does not synthesize unread counts or treat cached rows as authorization proof. Pass cursors back unchanged and reconcile projection lag or version conflicts through the released reads.

Cancellation and request IDs

ts
const cancellation = new AbortController();

const page = await appUser.conversations.query({
  limit: 25,
  requestId: 'req_conversations_001',
  timeoutMs: 20_000,
  signal: cancellation.signal,
});

// Cancel when the owning screen or request is obsolete.
cancellation.abort();
PreviousTrusted app-server clientNext TypeScript realtime
On this pageVChatClient or AppUserClient?Create a lower-level app-user clientMessages and read stateCancellation and request IDs
Report a docs issue