Login to Jira Cloud Using Postman

Hello,

Sorry for this basic question. I really searched but didn’t find any straight forward example.

I have a login/pass to our Jira Cloud instance. Now I want to play a little bit with RestAPI using postman.

I get of course for almost every get calls: “You are not authenticated. Authentication required to perform this operation”. The serverInfo works (/rest/api/3/serverInfo) :slight_smile:

I want to make Basic Auth using my login data , get a JWT token and use it in the other get/post operations.

Is there some straightforward description how to achieve this ? I don’t even know what it The URI for a login. Or does that work other way ?

thank you in advance for help

best regards
Marek

Hi @MarekCeizel,

For Basic Auth, you will first need to generate a token associated with your account. You can do this here: https://id.atlassian.com/manage/api-tokens

In Postman, click the Authorization tab (it should be to the right of Params). Make sure you’ve selected “Basic Auth” from the Type dropdown, and enter your account email address (NOT just your username!) as the “Username”, and the above-generated API token as your “Password”.

You should then be able to make any API requests your account has access to.

Also FYI: JWT is totally separate from Basic Auth, you don’t use one to get to the other. JWT is used in Connect apps :slight_smile:

1 Like

Thank you so much :hugs: I tried to use the API Token with API Key in Postman and tried Basic Auth with password. But that this has to be combined in this way is not really logical :slight_smile:

Two short questions / you will know

  • Is there some way to use the real password (or somehow encrypted) ? Or if we want to use some automated authentication we have to switch to o2auth
  • why I ask. Lets say I want to connect a ticketing system = create stories/tasks. Now can I connect always with the same user to jira and create stories/tasks like different user or I have to login always with the user which should be shown as createor of the story/task

hopefully I didn’t write some nonsense :slight_smile:

thank you
M.

OK. I got it.

API Token is a must as the password was deprecated.
I managed to login from my app using the header Authorization: Basic .

\Now I need help if there is some possibility to login without the base64 encoding:

thanks a lot
Marek

Hi @MarekCeizel,

A Connect or OAuth 2 app would be better for your situation.
If you decide to build a Connect app (and list it in Atlassian Marketplace) you’ll need the ACT_AS_USER scope in order to do actions on behalf of a user.
OAuth 2.0 is always on behalf of the user who authorized, so you’ll have the same scopes as that user anyway.

Hope this helps!

1 Like

Thank you so much, is worked !