Details
-
Suggestion
-
Resolution: Unresolved
-
None
Description
When trying to use Repository Access Tokens (RAT), Project Access Tokens (PAT) or Workspace Access Tokens (WAT) to POST/PUT/DELETE a deploy key (repository access key) through the API :
curl --request POST --url 'https://api.bitbucket.org/2.0/repositories/<workspace>/<repository>e/deploy-keys' --header 'Authorization: Bearer <Repository Access token>' -d '{ "label": "newlabel", "key": "ssh-rsa <rest of the key>"}'
The following error is returned :
{ "type": "error", "error": {"message": "This API is not accessible by this authentication mechanism"}}
This feature request is to implement the ability to use RATS, PATs, and WATs for POST/PUT/DELETE operations in the following endpoints :
- https://developer.atlassian.com/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-post
- https://developer.atlassian.com/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-put
- https://developer.atlassian.com/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-delete
It's currently only possible to use the username and app password or OAuth access token as the credentials for authentication.