I’m receiving an Unauthorized error with message “Token is invalid or not supported for this endpoint” when I call the List pull requests for a user endpoint.
My token has all the scopes selected. Any idea what is happening?
Thanks
I’m receiving an Unauthorized error with message “Token is invalid or not supported for this endpoint” when I call the List pull requests for a user endpoint.
My token has all the scopes selected. Any idea what is happening?
Thanks
Hi @RubnOlivares,
Welcome to the Atlassian Developer Community!
The List pull requests for a user (/2.0/pullrequests/{selected_user}
) does not support Access Tokens as authentication method. This is the case for all cross workspace end point.
The alternative that you could consider is to use an App password instead. I’ve tried it and can confirm it returns the pull requests.
Here is an example calling the endpoint with a curl
and the app password as authentication method:
curl https://api.bitbucket.org/2.0/pullrequests/<username> \
--user '<username>:<app-password>' \
--header 'Content-Type: application/json'
Thanks,
Caterina