Installation
To implement Inbox in React, you’ll need a backend to retrieve messages. This functionality is managed through theCourierInbox component and requires an active Courier account.
Steps to Set Up Inbox:
1
Install the Courier React SDK
Install the Courier React SDK package for your React version.
2
Create a JWT
After installation, you’ll need a JWT to authenticate your users. Each JWT should be generated for an individual user by your backend and securely provided to your frontend client. For details, see our full How to Send a JWT from Your Backend tutorial, which provides language-specific backend examples.Required JWT scopes for Inbox:An example payload to the issue-token API looks like :
user_id:{{userId}}- Restricts the token to a specific userinbox:read:messages- Allows fetching inbox messagesinbox:write:events- Allows marking messages as read/unread or archive
You can designate how long tokens last by passing an
expires_in property to the token generation.3
Configure the CourierInbox
Use JWTs to initialize and configure the CourierInbox component in your application. Here’s a complete example with JWT authentication:
Send a Notification to Inbox
To test your Inbox setup, send a message using the Courier Send API. Just set theto field to your user’s ID, add a title and body, and set routing to use only the "inbox" channel as shown in the example below.
Use curl, Postman, or any HTTP client with your API key. If successful, you’ll see the message appear in your Inbox UI.

Inbox First Message