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
4,364,371
Community Members
 
Community Events
168
Community Groups

Access BitBubket Rest API via personal Access Token? Access Token Expired

I am trying to access several APIs through  personal access Token, for example I am doing this :

    curl -i -H "Authorization: Bearer <token>" -X GET https://api.git06.mycorp.com/2.0/repositories"

                                  or

curl -i -H "Authorization: Bearer <token>" -X GET https://api.bitbucket.org/2.0/repositories"

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

It says token expired.

   {"type": "error", "error": {"message": "Access token expired."}}
What should I do ?

 

2 comments

I see this is rather old and still unanswered, but I'll give it a try anyway… I get exactly the same error, even with just created Personal Access Token. I wonder it it is even possible to use PAT to access REST API… Cagan, have you somehow managed to solve this issue?

Like Walter Davies likes this

Anyone at Atlassian? I'm running into the same error:

[ wgd@LIGETI Lo 61FAEB06 ~/Docs ]

$ curl --silent --request GET \

>     --url 'https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/commits' \

>     --header 'Authorization: Bearer <2-minute-old-app-password-with-all-read-perms>' \             

>     --header 'Accept: application/json' | json_pp                                     

{

   "error" : {

      "message" : "Access token expired."

   },

   "type" : "error"

}

[ wgd@LIGETI Lo 61FAEB26 ~/Docs ]

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events