I tried to curl /user using Repository Access Token, but failed.
$ curl --request GET --url 'https://api.bitbucket.org/2.0/user' --header 'Authorization: Bearer {REPOSITORY_TOKEN}' --header 'Accept: application/json' {"type": "error", "error": {"message": "Token is invalid or not supported for this endpoint."}}
Any plan to support this API?
I want to create pull request using this Repository Access Token, NOT App password .
App password is directory related my Bitbucket account. This is not suitable for my usage.
When I created pull request with Repository Access Token, something like bot account created pull request.
Therefore, seems possible to me to get the info on the account, which account type is "App User".
Hello @Genta Kuroki ,
and welcome to the Community!
As you've correctly noted, every Access Token is associated with a bot user. This bot user is automatically created and is unique to each access token. You can find details such as the ID and email associated with the bot user by accessing the access token in the Bitbucket UI.
However, it's important to note that the bot user is limited in scope and capabilities. The information available from this bot, such as its name or any other account profile details, cannot be altered. The /user
endpoint is not supported with Access Tokens because it's designed to retrieve personal user information, which doesn't apply to bot users.
With that in mind, could you provide us with more context about the specific information you are seeking from the bot account by calling the /user endpoint?
Thank you, @Genta Kuroki !
Patrik S
Hello @Patrik S
I want to use uuid.
There are many endpoints containing uuid, and I want to filter using uuid.
I think about following usecase:
(In Bitbucket Pipelines or somewhere)
Repository | Project | Workspace Access Token
-> /user API
-> get uuid
-> use many endpoints to filter responses
Thank you @Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Genta Kuroki ,
Thanks for the context on your use case!
I've raised a feature request with our engineering team to implement the support of access tokens in the Get the current user endpoint. You can find the feature request using the following link:
I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with this policy in mind.
Thank you, @Genta Kuroki !
Patrik S
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.