Hello,
I am trying to make a request to a REST API endpoint via my Atlassian Connect Plugin. Whenever I make a request I get a 401 response code and an HTML response.
Here's the current status and what I have tried.
I post a request like this:
GET /rest/api/2/status
Authorization: JWT <jwt>
Accept: application/json
Or like this:
GET /rest/api/2/user/search?username=%&includeInactive=true
Authorization: JWT <jwt>
Accept: application/json
What I get back is an HTML response with a 401 status code. There is no other detail in the HTML response as far as I can see. With cookie authentication these requests work and return JSON.
From what I can tell from reading this forum, I'm supposed to see a JSON error with details to help debug. Any ideas what I'm doing wrong?
Thanks,
Jason
Thanks @Jason MacInnes for dropping an update on your fix. It really saved me a lot of trouble.
I figured out my problem. I was using the value returned in the iss claim in the install hand shake as my iss claim when creating a JWT. However, in a request I was supposed to be using the key specified in the "key" property from the Atlassian connect descriptor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.