When using the JIRA Cloud REST API (creating issues, getting projects, etc) from our Connect App, we originally used a JWT in a “Authorization” header. i.e. Authorization: Bearer <JWT>
I believe we must have changed something (app scope?) and started receiving error responses. We added the JWT as a URL Param and it succeeded, i.e. POST /rest/api/2/issue?jwt=<JWT>
returns a 200 and a created issue.
The error we get when using the JWT in a header when attempting to create an issue is:
HTTP/2.0 400 Bad Request
{"errorMessages":[],"errors":{"summary":"Field 'summary' cannot be set. It is not on the appropriate screen, or unknown.", "description": "Field 'description' cannot be set..."}}
Which leads me to believe we’re not providing the correct context in the JWT. However, I don’t understand why using the same JWT (aside from timestamps) works as a URL param for the same endpoint.
I’ve verified the payload in the JWTs used in both cases are the same, i.e.
{
"exp": 1528178462,
"iat": 1528176662,
"iss": "<app-key>",
"qsh": "<qsh>"
}
Any idea what we’re doing wrong when using the JWT in an Authorization header?