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?
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.
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
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.
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:
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.
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.
BTW this is a great way to test your basic authentication setup. If you are supplying an email address of a user that has access, and you are supplying a valid (non-expired) authentication token, then you should be able to access /rest/api/3/myself.
Normally if this returns 401, either the user or the auth token is invalid.