I have created a TOKEN_NAME as PG_REQ in bitbucket.
When I pass the token name in the header of my PLSQL API I get this error.
The token permissions are read only.
{"errors":[{"context":null,"message":"You are not permitted to access this resource","exceptionName":"com.atlassian.bitbucket.AuthorisationException"}]}
Should the header value pass a token name PG_REQ before invoking REST API. ?
My basic authentication work when I pass user name and password.
Thanks
Sukarna
Hello Sukarna and welcome to the Community!
Thank you for providing the steps you took to create your token along with the error message you’re receiving when attempting to use said token.
Upon review, it looks as though you may have created your token with only read access on the repository. This would explain why you’re able to use your basic authentication without issue but are presented with an error upon using your newly created token.
We would suggest creating a new token which has the level of access you may need. Your levels may be one of the following read/write/admin.
More about the level of permissions with your API token may be found at Personal access tokens.
Please let us know if a new token with the required level of permissions works for your needs.
Regards,
Stephen Sifers
Thank you for your reply Stephen.
I have resolved this issue by passing header Authorization: Bearer XXXXXXXXXXX
Earlier I could not figure out what header parameters should be used for token based access to invoke REST API's.
Thanks
Sukarna
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.