Forums

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

I changed to an API token but I continue to get the error message about changing

MartinCausley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 21, 2026

I changed to an API token but I continue to get the error message about changing to an API token when I try to pull down code

5 answers

1 vote
Anwesha Pan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 3, 2026

Hi @MartinCausley 👋🏻

First of all, welcome to community! ✨

As @Tomislav Tobijas had mentioned above, please try OAuth instead of API tokens. Below are the steps to do the same:

1. Try switching to OAuth instead of API tokens

  • Go to Sourcetree → Preferences → Accounts

  • Remove your current Bitbucket account entry

  • Re-add it with Auth Type: OAuth

  • Follow the browser-based login flow when prompted

This bypasses the API token issues entirely and is the recommended path if you're hitting persistent errors.

2. If you want to stick with API tokens — clear all cached credentials

The old credentials are likely still being picked up even after you've configured the token:

  • macOS: Open Keychain Access → search for bitbucket and sourcetree → delete all matching entries

  • Windows: Open Credential Manager → remove any Bitbucket/Sourcetree entries under Windows Credentials or Generic Credentials

  • Then go back to Sourcetree → Preferences → Accounts, remove the account, and re-add it fresh with the API token

Hope this helps! 🙂

Thanks,
Anwesha

0 votes
Fabio Racobaldo _Catworkx_
Community Champion
August 6, 2026

Hi @MartinCausley ,

please provide us more information about error message received so that we can try to help you on that.

Fabio

0 votes
Tinker Fadoua
Community Champion
July 24, 2026

Any luck @MartinCausley ?

0 votes
Tinker Fadoua
Community Champion
July 21, 2026

Welcome to the Atlassian Community @MartinCausley 

Can you please elaborate little bit more on the steps you are taking until you get the error?

Best,

Fadoua

0 votes
Tomislav Tobijas
Community Champion
July 21, 2026

Hi @MartinCausley ,

Can you try this:

Any chance you can try using OAuth instead of API tokens? I've seen a couple of discussions around this and it would seem that OAuth works much better than this method. 👀

Also, if we're talking about API tokens, can you maybe try clearing out all auth credentials from credential manager and then re-adding the token to see if that will help?

There are a couple of discussions/questions and answers around this area, so I'd recommend checking them out:

Cheers,
Tobi

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events