Last Updated: October 2024
If you are looking to integrate any external applications or to migrate from or to a cloud-hosted version of Jira Service Management, you will need an API token.
We will tell you how to do it, in this article today. Before getting to the steps guide, let us look into what this API token is and its uses in brief.
Table of contents:
Jira API token
API tokens for Jira are a secure way to use scripts and integrate any external applications with Jira Server. These tokens are more secure than passwords and simpler to use than the OAuth. Also compatible with Single sign-on (SSO).
Atlassian Jira API tokens allow you to authenticate with cloud apps and bypass two-step verification and SSO. It is greatly used to retrieve data from the instance through REST APIs. Let us now move on to the steps to get the Jira API key.
How to generate Jira API token?
To get Jira cloud API token, you may require your Admin password to view and revoke the use of API tokens from your managed accounts. You will generate the token from your Atlassian account, then copy and paste it into the script.
- Log in to Atlassian and go to your Profile, then select Security and click on API-tokens.
- Click Create API token.
- Enter a relevant and memorable name for your token in the Label box, and click Create.
- Select “Copy to Clipboard”. Before you select “Close”, ensure that you save this API token as it is not available to view again once you close this box. Yet it is possible to create a new token if required, just like any password generation.
Use of API token
The primary use for API tokens is to enable you to interact with Jira programmatically. It provides better visibility of the usage of bot accounts and integrations and helps improve security and admin controls over API access.
This Jira cloud API token allows scripts to access the rest of the APIs for Atlassian cloud products using HTTP basic authentication.
Depending on the details of the HTTP library you use, simply replace your password with the token. For example, when using curl, you could do something like this:
curl -v https://mysite.atlassian.net –user me@example.com:my-api-token
Please note that me@example.com here is the email address for the Atlassian account you’re using to create the token.
To revoke an API token
Once you are done with the migration process, you can revoke the API key. A revoked API token will no longer work and is permanently removed from your account. But it is possible to replace it with a new token.
To revoke an API token:
- Log in to Atlassian and go to your Profile, then select Security and click on API-tokens.
- Select Revoke next to the API token that you want to revoke.
- To revoke all API tokens for your account, select Revoke all API tokens.
Remember: you should not revoke the API token when the authorization/migration is in progress. This will stop the data import or export. Then you will have to re-authorize and re-start the entire process from the very beginning.
Conclusion
So, that was all about the Jira API tokens and how to get them. We hope that this article will be helpful to you in the integration/migration process using the Jira application.
Nevertheless, we would like to recommend a much simpler-to-use software that enables all third-party integrations with just a click. Check out Saufter and all its automated features which help ease your customer support team’s endeavor.