Question
Why am I getting a 409
conflict error when authenticating users via Messaging JWT authentication?
Answer
409
errors in messaging JWT authentication indicate that the AppUserID
assigned to a specific user external_ID
is already being used in the system. Due to this conflict, the current user who tries to log in via JWT authentication can't be authenticated.
For example, this error can occur when an existing Zendesk user with an external_ID
1234 was updated and the external_ID
of the user changed, for example 123456. Both the user in Zendesk and the payload will have the same information, same email, and same external_ID
. When trying to authenticate the user however, the email registered for that user will be linked to an AppUserID
in Sunshine Conversation. Zendesk will only allow the authentication of the user with the previous external_ID
, 1234.
To resolve this behaviour and allow users with an updated external_ID
to log in via JWT authentication, you must delete the previous AppUserID
linked to the first external_ID
.
With Suite Professional and above plans, make an API call:
-
Basic authentication, use an API key and a secret key.
-
Username:
API_KEY_ID
-
Password:
API_KEY_SECRET
-
Username:
-
API method:
DELETE
-
URL for European accounts:
https://api.eu-1.smooch.io/v2/apps/{appId}/users/{userIdOrExternalId}
-
URL for the rest of the world:
https://api.smooch.io/v2/apps/{appId}/users/{userIdOrExternalId}
Within the above URLs, replace the{appId}
with the ID provided when generating the API key and secret key, and replace the{userIdOrExternalId}
with the previousexternal_ID
linked to the user who returns the error.
-
URL for European accounts:
ExternalId
, after the AppUserID
is deleted from SunCo. This article is provided for instructional purposes only. Zendesk does not support or guarantee the code. Post any issues you have in the comments section or try searching for a solution online.For more information, see this article: Authenticating end users for messaging.
0 comments