I am doing Trailhead from the link: https://trailhead.salesforce.com/modules/api_basics/units/api_basics_bulk and using the Workbench REST executor to bulkyfy the code. I am getting below error:

Raw Response
HTTP/1.1 400 Illegal character 0x20
Content-Length: 0
X-Cnection: close

I have make sure I am using valid SessionId using SOAP API tool.

Not sure what is the issue?

enter image description here

Making sure using correct sessionId:

enter image description here

  • Try removing the space between X-SFDC-Session and the : which follows. – Adrian Larson May 23 '17 at 18:23
  • This question certainly has nothing to do with Apex. – Adrian Larson May 23 '17 at 18:24
  • 2
    This question is about what happens when you violate the rules of HTTP, which any server in the world is bound to give you an error message for. The fact that you happen to be using salesforce.com doesn't mean this question is salesforce.com-related. – sfdcfox May 23 '17 at 18:37

I got the solution for the issue, I should not be using any space between X-SFDC-Session as mentioned in the documentation and it should be like

Content-Type: application/json; charset=UTF-8
Accept: application/json
X-SFDC-Session: 00D7F0000001I8v!ARgAQDJzlAoZrnEglefn9IN_8EsrRA.3E6lWmDC1Bm5r9FuUYu0yVYVh.KCe9yRFx63.zftlZIliCNxqrs1spJlJTheYy7YM
  • 1
    The documentation tells you how to access the API, right here. – sfdcfox May 23 '17 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.