Classic Web Widget Authentication

You can authenticate your Zendesk Web Widget to identify your users, and to make restricted Help Center content available to users.

Classic Web Widget Authentication

You can authenticate your Zendesk Web Widget to identify your users, and to make restricted Help Center content available to users.

By default Zendesk' Web Widget has no idea who's looking at the website. Similarly, when searching the Help Center via the widget, it will only show publicly available articles, and no articles assigned to a specific segment of users or your agents.

To fix this you can pre-fill or authenticate the Web Widget.

Setting it up is easy, as long as you have a working JWT endpoint. If you haven't got one, this guide will show you how to set one up using Cloudflare Workers.

GitHub - verschoren/zendesk_widget: Zendesk has a nice Web Widget to embed your contact channels and FAQ on any page of your website creating a consistent experience that aligns with your brand.
Zendesk has a nice Web Widget to embed your contact channels and FAQ on any page of your website creating a consistent experience that aligns with your brand. - GitHub - verschoren/zendesk_widget:…
💡
Note that this example code does not validate the user against any directory. It trust the input and returns a valid JWT for Zendesk to use.

How it works

Let's start at the end of the flow and show a working scenario.

  1. A user visits https://jwt.internalnote.com
  2. They enter their name/email and press login
  3. The website logs in the user and the widget authenticates
  4. Zendesk recognises the user and fills in their name and email in the prechat form and form fields.
  5. When the user searches the Help Center, restricted content becomes available.

The agent doesn't really see that the user was logged in during the Chat, but he will see the correct name, email and page view history.

Setting up Authentication

Authenticating a user requires the following steps: