# API Tokens at Account Level Not Working

**URL:** <https://community.developer.atlassian.com/t/api-tokens-at-account-level-not-working/94071>\
**Category:** Bitbucket Cloud\
**Tags:** rest-api\
**Created:** [July 24, 2025, 2:35pm UTC](https://community.developer.atlassian.com/t/api-tokens-at-account-level-not-working/94071 "2025-07-24T14:35:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RomanStoffel](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/romanstoffel/32/42175_2.png) [@RomanStoffel](https://community.developer.atlassian.com/u/RomanStoffel)\
**Post date:** [July 24, 2025, 2:35pm UTC](https://community.developer.atlassian.com/t/api-tokens-at-account-level-not-working/94071/1 "2025-07-24T14:35:21Z")

</div>

Background: I was looking into API/Access Tokens for Bitbucket, because the App Passwords are deprecated. The workspace and pre-repo access tokens do work as expected.

There are also Atlassian account level API tokens. I’ve noticed that there are now scoped tokens there, and that included Bitbucket. The link on the API token explicitly points to the Bitbucket documentation:

 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/1/1/114dfb8ad5da5a2117c86c5f945c6c487d8464ad.png)

So, I created one with read scopes:

 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/b/8/b831c752271463554f149c32ec956dff32386607.png)

However, when I use the created token, it does not work:

```auto
$ curl --request GET \
  --url 'https://api.bitbucket.org/2.0/repositories/RomanStoffel/test-repo' \
  --header 'Authorization: Bearer <the-token>' \
  --header 'Accept: application/json'

{"type": "error", "error": {"message": "Token is invalid, expired, or not supported for this endpoint."}}⏎    

```

So, these tokens do not seem to actually work?

---

<div class="post-metadata">

**Author:** ![RomanStoffel](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/romanstoffel/32/42175_2.png) [@RomanStoffel](https://community.developer.atlassian.com/u/RomanStoffel)\
**Post date:** [July 31, 2025, 5:08am UTC](https://community.developer.atlassian.com/t/api-tokens-at-account-level-not-working/94071/2 "2025-07-31T05:08:10Z")

</div>

Short answer: You must use this token with a email as a basic auth password.

There is now a hint in the token creation dialog. Not sure if that hint is new or I just missed it:

 ![image](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/0/8/083a98fe002d9ad91813cd34a6ce2c2fdf748686.png)

This refers to this documentation: [Using API tokens | Bitbucket Cloud | Atlassian Support](https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/)

So, use this token like this:

```auto
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/repositories/RomanStoffel/test-repo' \
  --user 'your-email:<the-token>' \
  --header 'Accept: application/json'

```

Then it works =)

---

<div class="post-metadata">

**Author:** ![HadiTavakoli](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@HadiTavakoli](https://community.developer.atlassian.com/u/HadiTavakoli)\
**Post date:** [September 16, 2025, 10:09am UTC](https://community.developer.atlassian.com/t/api-tokens-at-account-level-not-working/94071/3 "2025-09-16T10:09:24Z")

</div>

I also had missed the hint 🙂 Saw your message and yes, the hint was there and I simply missed it. Thanks!

---

<div class="post-metadata">

**Author:** ![dushyantjangra](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@dushyantjangra](https://community.developer.atlassian.com/u/dushyantjangra)\
**Post date:** [November 1, 2025, 9:24am UTC](https://community.developer.atlassian.com/t/api-tokens-at-account-level-not-working/94071/4 "2025-11-01T09:24:52Z")

</div>

Thank you @RomanStoffel. This solved my issue.
