embed.surge.app.
Available components
- Inbox: a list of all conversations for the current user, sortable and filterable
- Conversation: a single threaded conversation with send capability
- Unread count: a badge showing how many unread conversations the user has
- Phone (dialpad): a voice dialer for outbound calls (voice-enabled accounts)
Authentication
Each component mount requires a signed JWT. The JWT identifies which Surge account and user the component is showing data for.Two ways to get a JWT
Option 1: use the token endpoint (simpler) Call the user token endpoint from your server, then pass the resulting token to the component:Mounting a component
Each component is embedded as an iframe served fromembed.surge.app, with the token passed as a query parameter:
Next steps
Working with Users
How Users are provisioned and attributed to messages.
Inbox component
URL parameters and events for the conversation list.
Conversation component
Mounting a single thread inside your own page.
Unread Count component
Badge integration for navigation chrome.