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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,456,961
Community Members
 
Community Events
176
Community Groups

How to create API Token

Edited

{"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

image.png

https://confluence.atlassian.com/bitbucketserver071/personal-access-tokens-998653440.html#Personalaccesstokens-Generatingpersonalaccesstokens

1 answer

0 votes
Ben Atlassian Team Jul 17, 2022

G'day!

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:
https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/

  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 example.com/add-on the URL in your request must be something similar to example.com/add-on/function.

    • 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:
https://developer.atlassian.com/cloud/bitbucket/oauth-2/

For example - client credentials flow:

curl -s -X POST -u "client_id:secret" https://bitbucket.org/site/oauth2/access_token -d grant_type=client_credentials

 

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events