Search code examples
authenticationjira-rest-apihttp-status-code-401jira-agile

Agile JIRA Authentication failure


I am trying to get the token for my agile-jira server but getting

"401 Unauthorized"

for the below url I am using to get it done.

https://agile-jira.mycompany.com/jira/rest/auth/1/session

I am using Authorization as Basic Auth In header I am setting content-type to application/json

Using POSTMAN as my tool for sending REST calls


Solution

  • You should provide the encoded base64 user and password alongside the basic authentication.

    For the Authorization, provide Basic base64(user:password) parameter.

    base64 is a function that'll depend on how you're running these commands.

    If it's from Linux curl, this approach might work: "Authorization: Basic $(echo -n user:pass | base64)"

    References:

    https://developer.atlassian.com/server/jira/platform/basic-authentication/

    https://osric.com/chris/accidental-developer/2018/07/curl-basic-auth-base64-encoded-credentials/