I am getting AUTHENTICATION error.
headers = { "Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer <access_token>"
}
I feel the problem is with the "access token" field.
What should I provide in this field ?
Hi @Manoj M,
If you use Bearer in Authorization you will need to set up OAuth and use the access token generated as detailed here:
Please keep in mind these access tokens expire in two hours and you will then need to use the refresh token to generate a new access token (which will have the same expiry of two hours) and a new refresh token.
Another option would be instead of Authorization: Bearer to use Authorization: Basic
Authorization: Basic some_string
some_string is constructed by first combining a Bitbucket username and an app password for that account with a colon (e.g. myUsername:dgAT6frP9Ermn) and then by encoding the resulting string in base64.
If you have any questions, please feel free to let me know.
Kind regards,Theodora
It looks like you're new here. Sign in or register to get started.