What type of app I need to create to access Bitbucket API on user behalf

I need to authenticate with bitbucket using a client_id / secret. I don’t need a custom UI, just authorise an app and fetch some data. Similar to these:
What kind of app do I need to develop for this?
image

I tried to create a Connect app, but it adds itself to the specific workspace. I don’t want users to add OAuth consumers manually.
Thanks

@Alexs welcome to the Atlassian developer community.

For Bitbucket, you can use OAuth 2 to create a simple API client, without building an Atlassian Connect App. In case you aren’t familiar with all the OAuth 2 grant flows, the “Authorization code grant” would allow your client to “act as user”. However, there isn’t any way to add consumers automatically.

Connect Apps have “scope” that can be account (more or less workspace) or user level. And, to be clear, Apps can be added multiple times to multiple accounts or users. They are not “bound” to only 1 specific workspace. That’s probably the better option if you want to distribute what you are building because there is both listing in Bitbucket and in Marketplace.

1 Like

Thanks for the clarification, it looks like I need to set app context to personal. Will try it out

1 Like

I tried to set Descriptor context to personal, however, I receive
“Application must not declare ‘personal’ context in the descriptor” error.
In addition, I checked the source code of Atlascode Integration and it uses OAuth2, and has client/secret hardcoded in the code and it doesn’t require users to manually add OAuth consumers.

I am curious as to how I can create an app like that, one that is visible in Personal settings -> App Authorisations, same as in the screenshot.