The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Mike Kauspedas
May 9, 2022

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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

Mike Kauspedas
May 11, 2022

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

TAGS
AUG Leaders

Atlassian Community Events