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

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

Gagan Test
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!
April 23, 2020

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

dmilke August 7, 2021

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
Walter Davies
Contributor
February 2, 2022

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
AUG Leaders

Atlassian Community Events