Hi i'm trying to reach this endpoint with live agent rest api https://d.la1-c1-frf.salesforceliveagent.com/chat/rest/Chasitor/ChasitorInit Then got 400 Request is not a valid ChasitorInit Here is my request body

    organizationId: "00D58000000OwMB",
    deploymentId: "57258000000L1mj",
    buttonId: "57358000000L24F",
    agentId: "005B0000000F3b2",
    doFallback: true,
    sessionId: "5a1c70ff-2ae0-4ddf-ae40-f685c30d5e8f",
    userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36",
    language; "en-US",
    screenResolution: "2560x1440"
    visitorName: "Halid"
    prechatDetails: [

    buttonOverrides: [
    receiveQueueUpdates: true,
    isPost: true

} enter image description here

Im i doing anything wrong ??

  • 2
    SessionId expires in about 30 seconds, please check this Commented Jun 7, 2016 at 16:22

1 Answer 1


A few things may be at play here.

1) Try passing the X-LIVEAGENT-AFFINITY value as null. This prevents the session expiry.

2) If you copied your JSON from the online documentation example, it's wrong. You may want to use JSON lint to double check if your JSON is valid or not (I suspect this is most likely the issue in your case)

Unfortunately, the documentation still isn't updated but I've burnt my hands with this earlier and support was able to help resolve with the above suggestions. There's also another thread which lists these and a few other suggestions you may want to try.

  • Thanks @gaurav, as suggested the json is copied from the doc, therefore changed it to { "sessionId": "8f1cfb18-fbd1-4487-90d9-e98c0a84e165", "organizationId": "00D58000000OwMB", "deploymentId": "57258000000L1mj", "buttonId": "57358000000L24F", "userAgent": "", "language": "en-US", "screenResolution": "1900x1080", "visitorName": "Test Visitor", "prechatDetails": [], "prechatEntities": [], "receiveQueueUpdates": true, "isPost": true } It works !!
    – Halid
    Commented Jun 8, 2016 at 14:11
  • Great, happy to help! Commented Jun 8, 2016 at 14:15
  • I am getting "An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. " I am trying with API version 37 @GauravKheterpal Did you face this issue anytime?
    – Prasanna
    Commented Sep 26, 2016 at 10:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .