Forum Discussion

sachin's avatar
sachin
Mentor
11 years ago

help needed Getting error while using Rest Client to make SFDC OAuth user password call

Hi,   I am trying to make SFDC Oauth Username password rest api call to get session key, however I keep get error message "error making http request: Bad Request".   I configured the domain name ...
  • nathan's avatar
    11 years ago

    It looks like the body of the request is in a JSON format, but you're specifying the enctype as "application/x-www-form-urlencoded".Try changing it to "application/json".

     

    Otherwise, if you need to use "application/x-www-form-urlencoded", change the body to something like this:

    Name=Jonathan+Doe&Age=23&Formula=a+%2B+b+%3D%3D+13%25%21

    See here for more details:

    http://en.wikipedia.org/wiki/POST_%28HTTP%29#Use_for_submitting_web_forms