Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to create API Token


{"type": "error", "error": {"message": "Access token expired."}}


image.pngthis is invalid,I tried to follow the guidelines but still can't solve it.Because I can't set valid time and permissions


1 answer

0 votes
Ben Atlassian Team Jul 17, 2022


Welcome to the Bitbucket Cloud Community! :) 

The correct procedure to follow to create an OAuth access token can be found at the link below and is as follows:

  1. From your profile avatar in the bottom left, click on the workspace in the Recent workspaces list or click All workspaces to open an entire list from which to choose.

  2. Click Settings on the left sidebar to open the Workspace settings.

  3. Click OAuth consumers under Apps and features on the left navigation.

  4. Click the Add consumer button.  

    The system requests the following information:

    Name: The display name for your consumer. This must be unique within your account. This is required.
    Description: An optional description of what your consumer does.
    Callback URL: Required for OAuth 2.0 consumers.

    When making requests you can include a call back URL in the request:

    • If you do include the URL in a request it must be appended to the same URL configured in the consumer. So if your consumer callback URL is the URL in your request must be something similar to

    • If you don't include the URL in the request we redirect to the callback URL in the consumer.

    URL: An optional URL where the curious can go to learn more about your cool application.

  5. Click Save. The system generates a key and a secret for you.

  6. Toggle the consumer name to see the generated Key and Secret value for your consumer.

Once you have the Key and Secret value generated, you can then request the access token by running an API command based on the OAuth flow you are using:

For example - client credentials flow:

curl -s -X POST -u "client_id:secret" -d grant_type=client_credentials


Hope this helps.


- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events