Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get token via api using authorization_code

Guy Ludvig
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 19, 2018

Hello All, 

I am trying to connect to bitBucket API using C# grant_type=authorization_code.

With HttpClient Post Message i am sending the folloing data 

{"client_id", "xxx"},
{"client_secret", "xxx"},
{"redirect_uri", "http://www.google.com"},
{"code", "xxx"},
{"grant_type", "authorization_code"}

 

The response i am getting is  {"error_description": "Unsupported grant type: None", "error": "invalid_grant"}

 

please help.

 

1 answer

1 accepted

7 votes
Answer accepted
Guy Ludvig
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 19, 2018

I've solved the issue and i hope it will help someone.

BitBucket is not expecting JSon but FormUrl so simply use FormUrlEncodedContent

ferahl January 27, 2019

Thanks, how 1999 of them

Like Rafael Mazzucato likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events