API to Bitbucket with OAUTH

Hi,friends! Can i use API Bitbucket with OAUTH?
Thank you :slight_smile:

Welcome to the Atlassian developer community @AntiSoundWorld.

Yes, you can use the Bitbucket Cloud REST API with OAuth 2.0.

2 Likes

Thank you!
I am trying “Request authorization from the end user by sending their browser”.
my code is:
document.location.href = ‘Log in with Atlassian account’;

But browser console tell me “Refused to display in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’.”

how i can fix that?

@AntiSoundWorld,

It is our interpretation of the OAuth 2.0 spec that authorization code flow is not designed in such a way that it can run securely in an iframe. Can you let the flow work with simple browser redirection? Or can you explain more about why you need the authorization flow to work inside an iframe?

1 Like

My forge app(CustomUI) collect information of user from API Jira and Bitbucket.

Jira using module requestJira( ) with OAUTH.
I want to using request to Bitbucket like Jira with oauth.))

@AntiSoundWorld, Bitbucket isn’t supported in Forge now. Working around that limitation now would only result in an insecure app, which is all the more dangerous with user information.

I understand! Thank you very much)