Recherches récentes
Pas de recherche récente
Keeping user data updated via API
Publication le 06 nov. 2023
Hey,
I'm using ZenDesk users API to update/create user data before I make an authentication process using the JWT token. So, the flow looks like this:
1. I'm checking if the user exists in ZD via user API (querying it via email)
2. If exists I'm updating it data / if it doesn't I'm creating a new user (in both cases user will have added 'external_id'
3. I'm authenticating the user via JWT using the same 'external_id' (and I have some basic user data already in ZD)
And this flow works well. But there is one problem with it. When the user changes his email, (but it keeps his `external_id`) when I try to find the user via email it returns no results (as the email has been changed) BUT when I create a new user ZD API returns an error as `external_id` is reserved.
To omit that problem I want to add some sync user process when the user changes his email (so when the user changes email in our app, I want to update it via ZD API) is there any recommended way to create such a mechanism (implementation) ?
0
0 commentaire
Se connecter pour laisser un commentaire.