Forums

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

Auth Type: API Token not available in Sourcetree

Lakshmi Girija
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 8, 2026

I am trying to move from using App password to API Token to connect source tree. But the Sourcetree-> accounts only has two options for Auth type: Basic and Auth. I am using Sourcetree 4.1.9 for Mac. Tried logging in with bitbucket username and new API Token as password but does not work. 

3 answers

1 vote
Tomislav Tobijas
Community Champion
July 8, 2026

Hey @Lakshmi Girija ,

Can you try upgrading your Sourcetree app? The latest version for mMac is 4.2.18 and I believe only from a specific version API tokens are supported.

You can check Sourcetree archives (and release notes) here: https://www.sourcetreeapp.com/download-archives

Cheers, Tobi

0 votes
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.
July 13, 2026

Hi @Lakshmi Girija 👋🏻

First of all, welcome to community! ✨

As @Tomislav Tobijas and @Gabriela had mentioned, the issue is your SourceTree version. 

Here's what to do:

  1. Update SourceTree — Go to Sourcetree → Check for Updates and install the latest version. You need at least v4.2.14.

  2. Create an API token with the right scopes in Bitbucket Cloud:

    • Go to your profile → Account settingsSecurity tab → Create and manage API tokens

    • Select Create API token with scopes

    • Add these scopes at minimum: read:user:bitbucket, read:workspace:bitbucket, read:repository:bitbucket, write:repository:bitbucket (plus read:pullrequest:bitbucket and write:pullrequest:bitbucket if you work with PRs)

    • Copy the generated token immediately

  3. Configure SourceTree (after updating):

    • Go to Sourcetree → Preferences → Accounts

    • Add or edit your account

    • Set Host to Bitbucket

    • Set Auth Type to API Token (this option will now be available)

    • Enter your Atlassian email (not your Bitbucket username) in the User Email field

    • Paste your API token

Note: when you tried using your Bitbucket username with the API token as a password under Basic auth, that won't work because API tokens require your Atlassian account email as the username, not the Bitbucket username. But even so, Basic auth with API tokens isn't the recommended path in SourceTree — updating to get the native API Token auth type is the way to go. Refer this document for more details Add an API token to Sourcetree or another application | Bitbucket Cloud | Atlassian Support

I hope this helps & resolves your issue. 🙂

Thanks,
Anwesha

0 votes
Gabriela
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.
July 8, 2026

That option is missing because 4.1.9 is too old. Atlassian added the API Token auth type in the 4.2 line, and the docs say to be on at least 4.2.14 on Mac. On 4.1.9 the dropdown only ever shows Basic and OAuth, which matches what you're seeing.

So first, Sourcetree menu > Check for Updates and let it pull the latest. Once you're on 4.2.14 or newer, go to Preferences > Accounts, edit or re-add the Bitbucket account, and API Token will be there in the Auth Type list. Select it, put your Atlassian email in the User Email field, and paste the token into the API Token field. That email field is probably what broke your earlier attempt, since the API token pairs with your email there and it sounds like you were entering your Bitbucket username. When you generate the token at id.atlassian.com, give it the Bitbucket scopes read:repository:bitbucket and write:repository:bitbucket (I also tick read:user:bitbucket and read:workspace:bitbucket).

If you'd rather not update yet, OAuth is already in your list and Atlassian isn't deprecating it, so you can add the Bitbucket account over OAuth and log in through the browser. Gets you going today without an app password or token.

Suggest an answer

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

Atlassian Community Events