The authorization of bitbucket cloud application

I’m building a bitbucket cloud application that will process with pull-requests. Briefly, this application should make some comments on pull requests with some labels.

In this cloud application, it’s consuming Bitbucket REST API v2 to create comments on the pull-request after pull:request webhook is triggered. In plus, I’m using the Atlassian-connect-express as a template.

But this cloud app is being authorized as behalf of the owner who installs this application. So this cloud app will be using the owner’s token while consuming the Bitbucket API. I believe this is why the comments of the author will be the owner’s username, not bot(cloud app) name.

How can I get the auth token of the cloud application not owner’s token?

1 Like

Did you ever figure this out?

I want to try to do something similar.

Thanks Robert

1 Like

You can create an additional Bitbucket user with workspace admin privileges named “App Name”.
Log in as this user, install the app as this user, and you should be fine. All app activity is done on behalf of the ‘App Name’ user.
Hope that helps,
Best, Ulrich
// Izymes.

1 Like