Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


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!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

App password not working on uploading download artifact

Hi --

I have a 50meg windows installer for my product, that sits in the Downloads page of my project. I think this is what Bitbucket calls a "download artifact". Last year -- before Bitbucket started requiring app passwords -- I had no trouble uploading the installer to my Downloads page (I used Insomnia to send the HTML post),

After Bitbucket switched to app passwords, I generated an app password for my project and am able to git my code up/down from the server. But the upload of the download artifact fails. In an effort to solve that, I gave up on Insomnia and wrote a python script. Here's the script:

import requests

#url = ''
url = ''

headers = {
"Authorization": "Bearer MY_APP_PASSWORD"

files = {'file': open('test.txt', 'rb')}

r =, headers=headers, files=files)

Bitbucket gives this response:

{"type": "error", "error": {"message": "Access token expired."}}


How do I fix this?



Al Cramer

1 answer

1 accepted

0 votes
Answer accepted

I fixed my problem. When you open an account on Bitbucket, it asks that you enter a "Name" (I entered "Al Cramer", as that happens to be my name). When it creates depositories, it mangles the string you entered to create a string that they call your "username" (mangling seems to be: convert to lower case and kill spaces). That mangled string is the one that's used to create paths. 

BUT it's also the  string you need to specify as user if you do an HTTP POST.  This curl upload command fails:

curl -v -u "Al Cramer:MY_APP_PASSWORD" -X POST -F files=@test.txt

But this upload works:

curl -v -u "alcramer:MY_APP_PASSWORD" -X POST -F files=@test.txt

I leave it to minds more powerful than mine to consider Bitbucket's handling of "Name" vs "username", and how that impacted on their decision to switch from email addresses to mangled names on file uploads of depository artifacts. 

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events