Error setting up end user authentication in messaging | Community
Skip to main content

Error setting up end user authentication in messaging

  • March 24, 2022
  • 3 replies
  • 0 views

Xinran

Have set up my server to generate a JWT which I was able to verify using jwt.io. But when my iOS app tries to use the token to authenticate with Zendesk, I get the following error: "failedToDecodeJWT". This is currently happening within the sandbox environment (haven't tried in production yet). Not sure how to troubleshoot at this point since it seems like the token should be valid.

3 replies

Xinran
  • Author
  • March 24, 2022

Attaching screenshots of the code here


Hi Xinran,
 
Are you seeing a request to https://<your_subdomain>.zendesk.com/access/sdk/jwt and an HTTP status code in the response?
 
Best,

Mick11
  • April 14, 2022

Also,

I'm not sure if this is the problem, but the comma at the end of your external_id line, kid line and your headers line shouldn't be there. This may be causing the JSON payload to be malformed.

Example of building the payload are here.