I created zendesk account and generated jwt at admin center in Account > End user authentication. Added "script" tag generated by zendesk to my website and executed
zE("messenger", "loginUser", function (callback: (jwt: string) => void) {
callback("token");
});
on page initialization. Here is the jwt payload
{
"name": "name",
"email": "email@team.co",
"external_id": "904543952",
"scope": "user",
"iat": 1698322052,
"exp": 1698325652
}
The algorithm is HS256. And it still returns me 401 on /login request.
What did i do wrong?

Can you also double check that the shared_secret and
kidare correct, and being passed correctly? Thekidshould be in your headers object and the shared_secret should be sent in thejwt.signmethod.