
Partner - Contributor II
2024-03-08
06:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
401 Unauthorized, Code "AUTH-1" when calling /login/jwt-session
Hi everyone.
I'm getting a 401 - Unauthorized response with code "AUTH-1" when calling the
/login/jwt-session
endpoint from a local session proxy built with express modeled after the Implement a Qlik Cloud session cookie proxy example:const resp = await fetch(`https://${tenantUri}/login/jwt-session`, {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
},
})
That error is unexpected because:
- The same setup was working earlier this week
- I don't get the "details" field on the response, all I get is:
{"errors":[{"title":"Unauthorized","code":"AUTH-1","status":"401"}],"traceId":"bfd31bd2cb66b875ef9a975bb1ca91bc"}
- If I copy the exact same token and use it on Postman, the call is successful
I'm kinda stumped trying to fix this, since I can't find what "code":"AUTH-1" means anywhere and I also don't know what to do with that traceId. Anyone has any ideas to help with debugging?
932 Views
2 Replies

Employee
2024-03-15
04:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @pperdigo , compare request headers from your code and Postman, maybe you are missing something. If it works from Postman, should work from your code as well.
847 Views

Partner - Contributor II
2024-04-15
10:14 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex! Thanks for the reply
If I remender correctly, the headers were matching. Another weird thing I noticed after making this post is that if I ran the code from another device, the error wouldn't happen.
And as it turns out, a few days later, the code started working again on my main workstation and hasn't returned, so I just chalked it up to some browser weirdness.
770 Views
