You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi all,
I was able to create a bitbucket project by REST API, using the following:
/rest/api/1.0/projects [POST]
With the following body:
{"key": "TEST", "name": "TestProject", "description": "Test"}
And using the Basic Authentication.
Now, I create a Personal Access Token for a Bitbucket user admin and I'm trying to call the same REST api to create another project using the Personal Access Token but in this case I receive an error 401 Unauthorized: You are not permitted to access this resource.
How could I solve this problem?
Thanks
The problem is due to the fact that with token authentication it is possible to:
Create and fork repositories
Update project settings and permissions
Update repository settings and permissions
Push to repositories and perform pull request actions
Pull and clone repositories
But not to create projects.
Hi
Can you test a GET request? the token should be used in the same place the password was together with the username.
For ex. in curl it should look like this:
curl -s --user <userID>:<TOKEN> --request GET https://URL/rest/api/latest/projects?limit=10
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Idan Bidani ,
no, I need to call in POST because I must create a new Project on Bitbucket and I want use the Personal Access Token because more secure of the Basic Authentication.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.