Hi,
I’m trying to access the Jira API using Postman. I’ve already generated an API key and followed the instructions for authentication. However, the response I’m getting is empty, like this:
{
“startAt”: 0,
“maxResults”: 50,
“total”: 0,
“issues”:
}
Here are the steps I’ve taken so far:
- Generated an API token from my Atlassian account and used it with my email (
[your-email]
) for authentication in Postman.
- Used the following API endpoint:
https://.atlassian.net/rest/api/3/search
- Ensured that I have the correct permissions (e.g., Browse Projects) for the project in Jira.
- Verified that the project contains issues in the Jira UI.
Despite this, the API returns an empty response. Could you please advise:
- If there are any additional configurations I need to check?
- If there might be any restrictions causing this behavior?
Thank you for your help.
Hello @MuhammadZaimAlHusna
A 200 response with no results indicates your request wasn’t authenticated for access to that endpoint.
You need to configure Postman to use Basic authentication with your email address as the username and your token as the password. Google ‘access jira cloud rest api using postman’ to find the many articles and YouTube videos on the topic.
Once Postman is properly configured, you can use the Get Current User endpoint to immediately know if the authentication is working properly.
Thank you for your guidance. I have already tried configuring Basic Authentication in Postman as follows:
- Username: My Jira email
- Password: My generated API key
To verify the authentication, I tested the endpoint:
https://.atlassian.net/rest/api/3/myself
However, the response I received was:
Client must be authenticated to access this resource.
I have ensured the following:
- The API key is valid and newly generated from Atlassian API Token.
- My email and API key are correctly encoded into the
Authorization: Basic
header.
- I have cleared Postman’s cache and cookies to rule out stale data.
- My account has sufficient permissions to access the Jira project and REST API.
Could there be any additional settings or restrictions on my Jira instance that could cause this?
Thank you for your assistance.
Can I first confirm that you’re not trying to connect to the domain “https://.atlassian.net”, which of course doesn’t exist, but you’re trying to connect to your actual, real domain.
Please provide a screen grab showing the Postman session to your actual domain, with the request to the Myself endpoint path showing, with the Authentication tab open showing what you’ve put there too
yes https://my-domain.atlassian.net/rest/api/3/myself
i try that and i following this step
Generate a Jira API Token
To authenticate our API requests, we’ll use an API token. Here’s how to generate one:
- Log in to your Atlassian account and navigate to https://id.atlassian.com/manage-profile/security/api-tokens.
- Click “Create API token”, give your token a descriptive label, and click “Create”.
- Copy the generated token and store it securely. You won’t be able to view it again after leaving this page.
Make your first API request with Postman**
Let’s start by retrieving the details of an existing issue:
- Open Postman and create a new request.
- Set the HTTP method to GET and enter the URL for the issue detail endpoint, replacing your-domain with your Jira site’s domain and ISSUE-KEY with the key of an issue in your project: https://your-domain.atlassian.net/rest/api/3/issue/ISSUE-KEY
- Under the “Authorization” tab, select “Basic Auth” as the type. Enter your Atlassian account’s email address as the username and paste your API token as the password.
- Click “Send”. If everything is set up correctly, you should see a JSON response with the full details of the specified issue, including its fields, comments, attachments, and more.
There are NO SUCH domains as ‘my-domain’ or ‘your-domain’. They are pretend, made-up, dummy, fake domains.
Please provide the EXACT screen grab that I asked you to provide that shows YOUR DOMAIN’S name and the request going to the Myself endpoint.
this my screenshot when i try get response in the postman
You have not provided what I asked for:
- The Authorization tab is NOT open in those screen grabs (just obscure your password)
- The URL paths is NOT to the Myself endpoint
Based on the screen grab you have just provided, all I can advise is that the email address you are using and / or API token you have created are not valid for the domain zaimusna-123.atlassian.net A valid user email address + token will always work for a domain for which they belong.
Here is me using Postman to access the Myself endpoint in my personal domain using one of my personal API tokens and the user email address associated with that token:
Can you please provide a screen grab that shows the Headers tab open and all request header values visible.
“The response from my header is like this.”
That is not what I meant. I need you to open the Headers TAB, to make the list of request headers visible, not to show me the response headers
oh i am sorry, here the request from header
Those header entries are all correct and valid for Jira’s REST API.
So, now you know it’s either the email address or the token that is invalid for the domain.
Please use that Gmail email address to log into your Jira instance with a web browser. Once logged, open a new tab, then just paste the path to the Myself endpoint for your domain (https://zaimusna-123.atlassian.net/rest/api/3/myself) into the URL and hit enter. The web browser session is authenticated, so you should get the correct response from the API, with all the information about the user account returned.
Please confirm the response came back OK and the account information is correct.
Thank you for the suggestion. I followed your instructions and used the Gmail email address to log into my Jira instance in a web browser. After logging in, I opened a new tab and accessed the https://zaimusna-123.atlassian.net/rest/api/3/myself
endpoint directly in the browser.
The response came back successfully, and it correctly returned all the account information, confirming that the account and authentication are working fine in the browser.
Do I need to configure anything else in Postman apart from the API key, or is there some other setting that I might be missing?
Well, you’ve removed the user’s email address from the response, so I can only assume it was the same as the email address you blanked out in screen grab from Postman
Assuming it’s the same email address being used, then the only factor left is the API token.
- In the same web browser session (to ensure it’s for the same user account / email address), open a new tab and enter https://id.atlassian.com, which will automatically take you that user’s account home page.
- On the home page, click the account avatar in the top right of the screen and select ‘Account Settings’.
- In the account settings, click the Security tab and you’ll see a section called API Tokens
- Click the Create and manage API tokens hyperlink
- On the API tokens page, click the Create token button.
- Give the API token an appropriate name and accept the default expiry of 1 year
- Click the Create button
- Copy the resulting API token and paste it into a text editor, then save that as a text file for your own reference.
- Go back to your Postman session to the Myself endpoint and paste that exact same token into the password field in the Authentication tab.
- Double check the email address in the username field is exactly the same as the one being used to login to Jira and is associated with that token.
- Execute the request and let me know what happens. That token should work with that email address.
I have to go now and won’t be back until tomorrow, so can’t help any further at this point
So, @MuhammadZaimAlHusna , what was the outcome? Did that user email address and newly created API token work together in Postman for a Basic authentication type request to Jira? Yes or no.
Hi there, i saw this thread, and im having the same issue with postman.
I put my e-mail and the api key, but it gives me a response that im not authenticated.
Could you help me? @sunnyape
Hello @JonathanFerreiraMart
API token strings do not start with double greater than signs (>>):
so what you’ve put into the password field is not a valid API token.
PS. It’s considered bad etiquette on the forum to directly @ mention someone just to get personal help. Please don’t do that in future.