I am working on a POC where I need to create an Access Token for the Repository via the Bitbucket API endpoint. If there is any API endpoint, can you please share it?
As your focused on a REST API end-point to create tokens, this isn't available. Even worse, it is rather unlikely it will be, because of security considerations.
If I were you, I would definitely rethink the use case you're trying to solve.
Hello Milanjeet,
thanks for your question and welcome to the Atlassian Community.
Unfortunately there is currently no public Bitbucket Cloud REST API to create or manage repository access tokens. They can only be created in the UI under Repository settings → Access tokens.
Furthermore depending on what your POC needs, there are a few token options you could also consider:
For your POC, if the hard requirement is “create a repo token via API”, that is not possible today, so the closest alternative is to use a user API token or a workspace/project token (if available on your plan) and scope it as narrowly as your use case allows.
Hope that helps.
Greetings,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Milanjeet,
please let me know if you have any further questions regarding my answer.
If everything is clear and your issue is resolved, I would appreciate it if you could mark my answer as the accepted solution so that other users can find it more easily.
Best regards,
Alex
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.