Customize the messenger
Light or dark, sounds, and telling it who's signed in.
The messenger takes its settings from window.intercomSettings, the object you pasted when you installed it. Add any of these next to app_id.
Light or dark
theme is "auto" (the default, which follows each visitor's system setting), "light" or "dark":
window.intercomSettings = { app_id: "YOUR_WIDGET_KEY", theme: "dark" };
Sounds
A soft chime plays when your team replies. Turn it off with sound: false.
Tell it who's signed in
If visitors sign in to your product, your server signs a short-lived token that says who they are, and the page passes it as user_jwt. Your team sees who they're talking to, their conversations follow them to every device, and with an email in the token the messenger never needs to ask for one:
window.intercomSettings = {
app_id: "YOUR_WIDGET_KEY",
user_jwt: "TOKEN_FROM_YOUR_SERVER",
};
The token is a JWT signed with your workspace's identity secret (HS256). It carries the user's user_id, optionally their email and name, and an exp at most 24 hours ahead. Settings → Messenger → Identity verification has the secret and the code to sign one in Node.js or Python. Keep the secret on your server: anyone who has it can sign in as any of your users.
The token is the only way to tell the messenger who someone is. A user_id or email set on the page is ignored, because anyone could type anyone's, and so is a token that doesn't check out: the visitor chats anonymously and your browser console says why. Coming from Intercom? intercom_user_jwt works too.
If someone signs in after the page has loaded, as in a single-page app, pass their token:
Intercom('update', { user_jwt: "TOKEN_FROM_YOUR_SERVER" });
When they sign out, call Intercom('shutdown'). It forgets the visitor in that browser, so the next person to use it starts fresh.
Open it from your own buttons
Intercom('show')opens the messenger, andIntercom('hide')closes it.Intercom('showNewMessage', 'I have a question about…')opens a new conversation with that text ready to send.
Say hello first
To greet visitors with one-tap questions, see Greet visitors with quick replies.
Related articles
Still have questions?
Ask us in the chat and someone on the team will get back to you.