Installation
Use@wv/react, the private React package maintained in this workspace. It is not a public npm package. Add it through your application’s existing workspace dependency setup.
- Next.js
- React
Import Inbox inside a client component. The same React package works with the Next.js App Router.
@wv/react supports React 18 and React 19. Use the same version of react-dom as React when rendering the Inbox UI.Use Inbox with real subscribers
Connect Inbox to the environment where your workflows run. The application identifier identifies that environment; the subscriber ID identifies the person whose notifications should be displayed. You also need the API and WebSocket origins from your application’s configuration. Set both explicitly so the component connects to WorldVisa services.- Next.js
- React
getToken integration instead.
Secure the subscriber session
Fetch the subscriber ID and its credentials from your authenticated backend. The backend must verify who is signed in before issuing an Inbox hash or token. Never pass a secret API key to Inbox or calculate a hash in browser code. For HMAC authentication, passsubscriberHash. When you also provide context, pass the corresponding contextHash. Hash the exact context object sent to Inbox, including nested data. See Inbox with context for the server-side example.
Add portal or workspace context
If your workflows send notifications with context, initialize Inbox with the same context type and ID. For example, CRM uses portal context to keep its feed scoped to CRM notifications.props. When users switch workspaces, refresh their authorized context and credentials together. See Multi-tenancy.
Pass subscriber profile fields
Use a subscriber object when your integration needs to supply profile fields at session initialization.subscriberHash when HMAC is enabled.
Send your first notification
1
Check the environment
Use the same environment for the workflow, subscriber, application identifier, API origin, and WebSocket origin.
2
Create an in-app message
Add an in-app step to a workflow and write a subject and body. Create a workflow walks through this process.
3
Trigger it for your subscriber
Send the workflow event from your backend with the subscriber ID and matching context. Keep the trigger’s transaction ID if you need to investigate the delivery.
4
Open Inbox
Check the bell’s unread count and open the notification list. If no message appears, inspect the Activity Feed, then check the subscriber, context, and browser connections.