JWT 401 error in Zendesk Support SDK
Hello Team
We are trying to integrate Zendesk Support SDK, and want to use JWT identity.
1/ In android app, we initialize SDK like it is described in documentation:
Zendesk.INSTANCE.init(context, ZENDESK_URL, APP_ID, CLIEND_ID)
Zendesk.INSTANCE.setIdentity(JwtIdentity("AccessToken"))
Support.INSTANCE.init(Zendesk.INSTANCE)
2/ We have build dedicated endpoint on our backend according to documentation, tested it:
curl "our_service_uri" -d "user_token=AccessToken" -v -X POST
...
* Connection #0 to host left intact
{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiT2xDYXJlZ2l2ZXIiLCJlbWFpbCI6InNlZ29jYWozMzFAcm9iaHVuZy5jb20iLCJqdGkiOiIzNWUwNjU2NS1mODY2LTRmNzQtOWM5Yy04ZGFmN2EwYjg1ZjQiLCJuYmYiOjE2ODIwNjU3MzYsImV4cCI6MTY4MjA2OTMzNiwiaWF0IjoxNjgyMDY1NzM2fQ.1aLF3-3qpabiPsFG_rJpHCqBsX_Ygp6aqamvVQt06XE"}
3/ We checked that configuration in Zendesk Admin complies with all the requirements.
4/ When I'm opening RequestActivity, and trying to submit new Ticket, request
https://intrexis.zendesk.com/access/sdk/jwt
always fails with 401 error:
D/ZendeskIdentityStorage: Loading Jwt identity I/okhttp.OkHttpClient: --> POST https://intrexis.zendesk.com/api/mobile/requests.json?include=last_comment (338-byte body) D/SettingsInterceptor: Proceeding with chain. D/ZendeskIdentityStorage: Loading Jwt identity D/GsonSerializer: Unable to deserialize the provided object into AccessToken W/ZendeskIdentityManager: There is no stored access token, have you initialised an identity and requested an access token? D/ZendeskAccessIntercepto: Access token is required, intercepting. D/ZendeskAccessIntercepto: JWT Identity found. Requesting and storing auth token. D/ZendeskAccessProvider: Requesting an access token for jwt identity. W/RequestActivity: Unable to parse rich text. Error: 'Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference' | 'null' I/okhttp.OkHttpClient: --> POST https://intrexis.zendesk.com/access/sdk/jwt (1621-byte body) I/System.out: [socket]:check permission begin! W/System: ClassLoader referenced unknown path: system/framework/mediatek-cta.jar I/System.out: [socket] e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaUtils I/okhttp.OkHttpClient: <-- 401 https://intrexis.zendesk.com/access/sdk/jwt (1074ms, 37-byte body)
Could you please check logs for our account on Zendesk server, and tell us, what causes this issue?
Thanks & Regards,
Uladzislau Melikhau
-
Hi Uladzislau,
I've created a ticket to discuss the details of this issue with you.
Please sign in to leave a comment.
1 Comments