API tokens

Still need help?

The Atlassian Community is here for you.

Ask the community

You can use an API token to authenticate a script or other process with an Atlassian Cloud application. You generate the token from your Atlassian account, then copy and paste it to the script.

If you use two-step verification to authenticate with your Atlassian Cloud site, then your script will need to use a REST API token to authenticate.

API tokens can be used with the Jira Cloud and Confluence Cloud REST APIs.

If you're using Bitbucket Cloud, see App passwords. For Stride, see Authentication. For Hipchat, see API access tokens.

Create an API token

Create an API token from your Atlassian account:

  1. Log in to https://id.atlassian.com.
  2. Click API tokens, then Create API token.
  3. Use Copy to clipboard, and paste the token to your script, or elsewhere:

Note:

  • For security reasons it isn't possible to view the token after closing the creation dialog; if necessary, create a new token.
  • You should store the token securely, just as for any password.

Use an API token

A primary use case for API tokens is to allow scripts to access REST APIs for Atlassian Cloud applications 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

Note that me@example.com here is the email address for the Atlassian account you're using to create the token.

Last modified on Mar 23, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.