function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
solid jetechsolid jetech 

Salesforce Oauth Obtaining Access token error

i get an error while trying to obtain the access token im using golang to develop this oauth process but anyhow once the acess token is requested it gives an error back saying error got 400 {"error":"unsupported_grant_type","error_description":"grant type not supported"} User-added image
this is my url to obtain the token https://login.salesforce.com/services/oauth2/token
below image shows the paramters that are being sent 
User-added image

am i missing something in here ? please do help me in any means mostly it would suit if you could solve it using golang 
thanks 
 
logontokartiklogontokartik
From what I see I think you are using Web Server flow. What are you doing with the code after you get it back? Can you try the Username-Password flow with grant_type=password and see if its working?
Hanimi ReddyHanimi Reddy
grant_type=password&username=[YOUR USERNAME]&password=[YOUR PWD]#&client_id=[CONNECTED APP CLIENT ID]&client_secret=[CONNECTED APP CLIENT SECRET]