Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket OAuth2 - Grant Access button not redirecting to callback url

Hi all,

I'm trying to get my app to authorize through OAuth2.

i've set up the OAuth2 entry, received the Client Id and secret.

I've also set the callback url to something like: something://somethingElse


When browsing to***CLIENT_ID****&response_type=code


I get the page that tells about the permission I'm giving to the app and I'm able to click the Grant Access button.

The issue is that the click doesn't redirect to the callback url. It loads for a second and stays on the same page. The access is granted (I've checked in my Bitbucket profile).


Any help will be appreciated.

Thanks a lot,


1 answer

1 accepted

0 votes
Answer accepted

Hi there,


Is this mobile app or web app?

If this is mobile app, make sure that your "deep linking" is working properly.

Thanks for answering. 

This is a mobile app. But even on a laptop browser the callback url not loaded.

I've found out that when setting the scheme to be http (or https) it works fine, but I wanted to avoid using http/s (and it was possible before) to avoid other apps from responding to this intent (Android) 


For example this url doesn't work: bitbucket://my_app

And this does: https://my_app




>>>For example this url doesn't work: bitbucket://my_app

Because some other app, already register this url for deep link. To troubleshoot this problem

  • so give some randomstring://my_app instead of bitbucket://my_app inside your android app and do the same in bitbucket's redirect url too.
  • Give this url directly into your device's browser. if this is working fine, we need to debug it further from our size. It is not not redirecting, it is "deep link" issue.


>>> I wanted to avoid using http/s (and it was possible before) to avoid other apps from responding to this intent (Android) 

Even when you use bitbucket://my_app, it is possible to use your intent from other app too. In this case there is no much different between http(s) and bitbucket://my_app.

As far as I know, it is better to use http(s) over bitbucket://my_app for deep link.

I will check again. 

For the record, I didn't use bitbucket://my_app. I've something more unique than that. 

I'll update soon. 

Hi Barry,

Checked it once again and found the issue. It was indeed an app issue with defining the url host.

For future developers: My mistake was to include the "://" in the host name defined in the activity intent filter.


Sorry for the hassle and thanks a lot for the help.



Like Barry Allen likes this

Giora, Thank you for the update.

@gioravered , can you please mark my answer as "Best answer", since the problem is reload to "deep linking".

I thought I did.. 

Marked now. Thanks again. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

442 views 4 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you