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

Can't get Oauth token. Invalid redirect_uri

vid.vranjek
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 18, 2019

Hi,

I am trying to get an oath token by following  instructions here:

https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html

and here:

https://community.atlassian.com/t5/Bitbucket-questions/hot-to-git-clone-with-oauth-how-to-create-token-for-this-kind-of/qaq-p/686446#M21947

 

I always get to the point, where I have to enter my consumer key (which I successfully generated) in

https://bitbucket.org/site/oauth2/authorize?client_id={key}&response_type=token

Is follows (don't worry, I am doing this with a throw away repo): 

https://bitbucket.org/site/oauth2/authorize?client_id=mcmg4fzgQaMgADxQG5&response_type=token

 

And I get an error message 'Invalid redirect_uri'. And now, an hour later, I get now response at all, just a white page.

Am I doing something wrong or is there something wrong with bitbucket?

Why can't I just generate a token using a user interface, like on github?

 

Thanks for your help!

 

1 answer

1 vote
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 20, 2019

Hi @vid.vranjek,

It looks like the OAuth consumer you created lacks the callback URL which is required for OAuth2. This is why you're getting an error about redirect URL.

don't worry, I am doing this with a throw away repo

Just a heads up, OAuth tokens are currently scoped not to a repository but to an account. Consumer ID on its own is useless though, so no things to worry about here.

Hope this helps.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events