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
Server-side

Trusted app-server client

Use AppServerClient from a protected backend to manage data-plane resources and mint app-user tokens.

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

Construct the client

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

const appServer = new AppServerClient({
  baseUrl: 'https://api.example.com',
  tenantId,
  appId,
  environment: 'production',
  credential: readCurrentVChatCredentialFromSecretStore,
});
Protected runtime only

AppServerClient and its application credential belong in a customer server, worker, or similarly protected runtime. Never bundle them into web or mobile clients.

Resource facades

FacadeCommon methods
appUsersupsert, get, query, search, deactivate, reactivate, issueToken, revokeTokens
channelscreate, query, search, get, update
channelMembershipsadd, get, update, remove
messagessend, query, search, sendReply, getThread, get, update, delete, listReactionUsers
moderationput/delete/query bans, blocklists, moderation cases, resolve case

Retries, versions, and fixed identities

The client includes exact tenant, app, and environment locators, omits cookies, bounds timeouts, and retries only eligible safe reads once by default. Mutations are never retried automatically.

ts
const membership = await appServer.channelMemberships.add(
  'messaging',
  'support-123',
  'customer-user-1',
  { custom: { source: 'support-import' } },
);

await appServer.channelMemberships.update(
  'messaging',
  'support-123',
  'customer-user-1',
  {
    expectedVersion: membership.data.membership.version,
    custom: { source: 'manual-review' },
  },
);

Issue an app-user token

ts
const issued = await appServer.appUsers.issueToken({
  userId: 'user-123',
  lifetimeSeconds: 3600,
});

return {
  token: issued.data.token,
  expiresAt: issued.data.expiresAt,
};

Authenticate the caller in your own backend and derive user-123 from that trusted identity. The device must not select an arbitrary V Chat user ID.

PreviousTypeScript SDK overviewNext App-user clients
On this pageConstruct the clientResource facadesRetries, versions, and fixed identitiesIssue an app-user token
Report a docs issue