Setting up user authentication for messaging



image avatar

Aimee Spanier

Zendesk Documentation Team

Edited May 07, 2025


3

160

167 comments

Has the new fix that you mentioned made it so that when the user sends a message from the widget and their external_id is set in the JWT, if there already existed a user with that same external_id then it wouldn't create a new one and instead asign that ticket to that "old" user?

Hi Santiago, this will be rolled out in early May. 

- Prakruti

1


Danny Larsen we haven't, and since then also moved on to a different solution.

For us being able to link users in live support use cases to our customer base is absolutely crucial. Neither this thread nor Zendesk Support had yet provided a satisfactory answer to even whether the fact Zendesk Messaging creates duplicate users with not even the external ID but also the same email address is known behaviour, a bug of Zendesk, or should not happen and we were doing something wrong.

The only feedback so far is that users will be "merged" as soon as the improvement goes live, with no further information on what this means in terms of data conflict resolution, etc.

It's disappointing there is such a lack of transparency for what probably comes down to the main use case of this feature for most people.

2


Did anyone solve the issue with not linking users?

We are also trying to create users via the APi with email and external_id and then identify them via a JWT token. But that just creates a new user without the external_id.

Pretty useless without this.

1


Hi Zendesk team,

I using widget classic and facing this issue when I called API: https://id.zopim.com/authenticated/web/jwt and I got this error: "error fetching shared secret"

I generated SHARED_KEY  in https://textback.zendesk.com/admin/account/security/end_users#messaging . Its right?

 

0


So I've implemented the backend functionality to provide a signed JWT to the client part of the application, then I use the Web Widget API (https://developer.zendesk.com/documentation/zendesk-web-widget-sdks/sdks/web/sdk_api_reference/?_ga=2.111275911.280573301.1649945109-889103865.1649945109#authentication) to log the user in, after which in the response I can see that the JWT was successfully decoded. Yet, the `name` and `email` don't get pre-filled in the chat - should I somehow retrieve the users' Zendesk ID in our client application and add it to the JWT? I'd assume that this is the role of the Web Widget API... What might I be doing wrong there?

0


Hi Prakruti Hindia
When a user sends a widget message and its external_id is set by a JWT authentication, if there is already a user with the same external_id in the base (in the case of a base import, for example), will the application create a new user instead of linking it to the existing one?

3


Hi Prakruti Hindia,

Has the new fix that you mentioned made it so that when the user sends a message from the widget and their external_id is set in the JWT, if there already existed a user with that same external_id then it wouldn't create a new one and instead asign that ticket to that "old" user?

Cheers,

Santiago

5


Zendesk messaging I see doesn't have as many callbacks for us to use as the classic version does.
How do I know when the exp is about to expire and re-call the loginUser APi?
Using a timer to keep track and then calling loginUser is a bad solution

1


Hi Mick

Considering the console error I mentioned shows up even when there is nothing but the code I'm provided by Zendesk to install the messaging widget, and the console error is provided by Zendesk code, I completely disagree.

That said, I submitted a ticket. Hopefully, they can be more helpful. Thanks

0


Hi Justin,

This is likely to be an issue with your integration, as I don't believe we've any known issues of this nature on the Web Widget. Do you mind opening a Support ticket at support.zendesk.com please (Messaging icon in the lower right corner), and we'll assist you with this issue.

-2


Sign in to leave a comment.