Skip to main content
Replyke exposes its infrastructure through a REST API. On top of that, the React and React Native SDK packages provide a higher-level integration layer that handles token management, state, real-time subscriptions, and type safety automatically. This page explains your options so you can choose the path that fits your project.
When using Replyke from a web application in production, whitelist your domain in the project dashboard. Requests from non-whitelisted origins will be rejected.
If your application uses React or React Native, the SDK is the recommended integration path. It wraps the REST API in a set of hooks and context providers that do the heavy lifting:
  • Token lifecycle — Access tokens are requested, stored, and refreshed automatically. You never manually manage auth headers.
  • Real-time — The chat system connects via WebSocket automatically when ChatProvider is mounted. Message delivery, read state, and typing indicators are handled for you.
  • Optimistic state — Actions like sending a message or toggling a reaction update local state immediately and sync with the server in the background.
  • Typed interfaces — Every object your hooks return is typed against the interfaces in @replyke/core. You get full autocomplete and type safety across entities, users, conversations, comments, and more.
  • Context providers — Features like the entity subtree, comment section, conversation, and space are scoped via React context providers, so any component in the subtree can access the full feature state with a single hook call.

React (Web)

Install @replyke/react-js. Works with Next.js, Vite, Create React App, or any React web setup.

React Native / Expo

Install @replyke/react-native (or @replyke/expo for Expo-managed workflows with secure token storage).

SDK Package Reference

PackagePlatformNotes
@replyke/react-jsReact webFull SDK for browser environments
@replyke/react-nativeReact NativeFull SDK with AsyncStorage token storage
@replyke/expoExpoSame as React Native but uses SecureStore
@replyke/coreSharedPlatform-agnostic hooks and types — not imported directly in most cases

Option 2: Raw REST API

If your application does not use React, or you need to call Replyke from a server-side context, the REST API is available directly. All endpoints are under /:projectId/api/v7/. Every request that requires a user identity must include a valid access token in the Authorization: Bearer <token> header. Use cases for direct API access:
  • Vue, Angular, Svelte, or other non-React frameworks
  • Server-to-server operations (e.g., creating entities on behalf of users, webhook handlers, scheduled jobs)
  • Custom SDKs or thin client wrappers
  • Testing or exploration with tools like Postman or curl
For server-to-server calls, using a service API key is almost always the right approach rather than managing individual user access tokens. A service API key is generated once from the project dashboard and stored securely on your server. When included in a request, it grants elevated access to the API:
  • No user token required — the service key bypasses user authentication entirely. You do not need to sign in as a user or manage token refresh on the server.
  • Act on behalf of any user — many endpoints accept a userId body parameter when the request is authenticated with a service key, allowing you to perform actions on behalf of a specific user.
  • Elevated permissions — the service key bypasses ownership checks, so it can update or delete any content, access draft entities, and read private user fields regardless of which user owns the resource.
Requests with a service key require two headers:
Authorization: Bearer <your-service-api-key>
x-replyke-project-id: <your-project-id>
The service API key has full administrative access to your project’s data. Never expose it in client-side code, browser environments, or mobile apps. Only use it from your own server.
When using the API from a client-side (browser/mobile) context without a service key, you are responsible for requesting and refreshing user access tokens, maintaining auth state, and handling real-time features (WebSockets) yourself if needed.
See API Reference → Getting Started for authentication details and base URL configuration.

Option 3: Redux Store Integration

If your React application already has its own Redux store, you can integrate Replyke’s state directly into it rather than using the default built-in store. By default, ReplykeProvider creates an internal Redux store for Replyke’s state. If you have an existing store, using two separate Redux stores in one app is not ideal. ReplykeIntegrationProvider lets you pass your own Redux store configuration and mount Replyke’s reducers and middleware alongside your own. This requires:
  • Adding replykeReducers and replykeApiReducer to your combineReducers call
  • Adding replykeMiddleware to your middleware chain
  • Using ReplykeIntegrationProvider instead of ReplykeProvider
See SDK Reference → Redux Integration for the full setup guide.

Choosing the Right Path

ScenarioRecommended
Building with React or React NativeSDK (@replyke/react-js or @replyke/react-native)
Expo project@replyke/expo
Already have a Redux store in ReactSDK + Redux integration (ReplykeIntegrationProvider)
Vue, Angular, Svelte, or other frameworksREST API with user access tokens
Server-side / backend operationsREST API with service API key
Webhook handlers, scheduled jobs, data pipelinesREST API with service API key
Mobile app without React NativeREST API with user access tokens