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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

I am getting auth error while trying to create a repository using REST API through python script

I am getting AUTHENTICATION error.

headers = { "Accept": "application/json",

                        "Content-Type": "application/json",

                         "Authorization": "Bearer <access_token>"

                    }

I feel the problem is with the "access token" field.

What should I provide in this field ?

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 03, 2022

Hi @Manoj M,

If you use Bearer in Authorization you will need to set up OAuth and use the access token generated as detailed here:

Please keep in mind these access tokens expire in two hours and you will then need to use the refresh token to generate a new access token (which will have the same expiry of two hours) and a new refresh token.

Another option would be instead of Authorization: Bearer to use Authorization: Basic

Authorization: Basic some_string

some_string is constructed by first combining a Bitbucket username and an app password for that account with a colon (e.g. myUsername:dgAT6frP9Ermn) and then by encoding the resulting string in base64.

If you have any questions, please feel free to let me know.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events