Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
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

Can I login to the bitbucket API with an atlassian account api token?

I created an atlassian account API token but get Access token expired when trying to access the bitbucket api (for bitbucket cloud). Using the auth header below. 

Authorization: Bearer <access_token>

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2022

Hi @Mike Kauspedas,

Thank you for reaching out to the community.

When you generated an OAuth access token, would it be possible for you to confirm if you've generated it using one of the grant types mentioned in this documentation? - Use OAuth on Bitbucket Cloud

Also, if you'd like to generate an OAuth access token programmatically, you can use the CURL command below using Client Credentials Grant (4.4).

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

Hope it helps and let me know how it goes.

Regards,
Mark C

Thanks for replying. I can generate the tokens but I want to know if I can use an atlassian account token. https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 11, 2022

Hi @Mike Kauspedas

Thanks for the confirmation.

Unfortunately, it is not possible to use an Atlassian account API token as access token to authenticate with Bitbucket Cloud API endpoints.

You will need to use OAuth 2.0 access token in this case.

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events