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
atlassian, confluence administration certification, atlassian certified professional, confluence admin for cloud, atlassian learning, confluence training, confluence certification exam, confluence cloud admin, admin credential, atlassian certification

Become a certified Confluence admin today! 📖

Stand out as a skilled Confluence Cloud administrator. The Confluence Administration for Cloud certification proves you can configure permissions, manage site and space settings, and monitor activity—ensuring secure, effective collaboration for your team.

Start here
AUG Leaders

Atlassian Community Events