in Education by
I'm trying to get an authorization token using the Username-Password flow (as described in the final section of this article). I'm sending the following request (using Python's httplib, in case that's relevant): https://login.salesforce.com/services/oauth2/token POST data: username=&client_secret=&password=&grant_type=password&client_id= And getting the response: 400 Bad Request {"error":"unsupported_grant_type","error_description":"grant type not supported"} Is the password grant_type really unsupported, or am I missing something? It seems to give this error even when I'm sending a grant_type that definitely does work (such as authorization_code). Note that I've tried the suggestions in the answer here, and they don't work for me. Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Actually, this is because of the content-type header which has not been set to the correct value. It should actually be set as: application/x-www-form-urlencoded. Also, you need to make sure that your parameters are correctly encoded. To learn in-depth about Workflow in Salesforce, sign up for an industry based Salesforce developer certification.

Related questions

0 votes
    I would like to get some ideas on to properly handle Salesforce OAuth Consumer Key and Secret in Chrome ... .0 implementation? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I am asking this in very general sense. Both from cloud provider and cloud consumer's perspective. Also the ... Server like Biztalk? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I have recently discovered that salesforce.com is much more than an online CRM after coming across a Morrison's Case ... ' .Net route? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    The Salesforce.com API seems to assume that you will always use the app as an active user. Their ... require user interaction? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    The Salesforce.com API seems to assume that you will always use the app as an active user. Their ... require user interaction? Select the correct answer from above options...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    When using the SOAP API to work with salesforce.com (SFDC) it seems that the primary key in the underlying database ... is all about? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I have a page with a form that posts to salesforce.com's webto Lead service. I am trying to make an ... receiving website can see? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I have a page with a form that posts to salesforce.com's webto Lead service. I am trying to make an ... receiving website can see? Select the correct answer from above options...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me how do I prepare Salesforce App Builder certification? Select the correct answer from above options...
asked Jan 10, 2022 in Education by JackTerrance
0 votes
    Could someone tell me how to get a job in Salesforce? Select the correct answer from above options...
asked Jan 6, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me how to land a job with Salesforce Admin Certification? Select the correct answer from above options...
asked Jan 19, 2022 in Education by JackTerrance
0 votes
    We're currently looking at using the Force.com platform as our development platform and the sales guys and the ... such a platform. Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I'm starting out with force.com development, and I'm currently a little hazy about what the above terms all mean. ... (if at all)? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I would really appreciate if someone can guide me to check if a particular field is included in update call inside ... . Many thanks. Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    We're looking into setting up a proper deployment process. From what I've read there seems to be 4 ... PickList items? SControls Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
...