Hi,
I've created an API token with the following scopes:
And trying to access this endpoint:
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/mycompany/myrepo/pullrequests/742/diff' \
--header 'Authorization: Bearer XXX'
I'm getting this error:
{"type": "error", "error": {"message": "Token is invalid, expired, or not supported for this endpoint."}}
Any idea what might be wrong?
Thanks.
Hi Vaslie?
I'm assuming you are not using the OAuth2 flow here?
On Using API tokens | Bitbucket Cloud | Atlassian Support you can find an example on how to authenticate for API calls using a token.
You should use the combination of username and token instead of using a token only.
Ok, thanks.
I've tested with "Authorization: Basic <base64 string>" and now I'm getting a Bad request page...
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.