Skip Navigation
Expand
Error JSESSIONID not specified or invalid
Answer ID 8130   |   Last Review Date 12/31/2018

What does the error "JSESSIONID not specified or invalid" mean?

Environment:

Chat APIs

Resolution:

When you see an invalid SESSIONID during a chat session, it is because you are not passing back the correct sessionid in the <SessionID> element.

The error you will see is "JSESSIONID not specified or invalid".

If so, be sure you are passing the SessionID that you would have received from the RequestChat call in the RequestChatResponse.  It sounds like it is not in sync at some point.

When you call RequestChat, you will get a RequestChatResponse message.  This response will include the SessionID that you will need for RetrieveMessages, as well as PostChatMessage, and TerminateChat.  This SessionID needs to be included in the ChatClientInfoHeader.

For example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="urn:messages.common.chat.ws.rightnow.com/v1" xmlns:v11="urn:messages.enduser.chat.ws.rightnow.com/v1">
  <soapenv:Header>
    <ChatClientInfoHeader xmlns="urn:messages.common.chat.ws.rightnow.com/v1">
      <AppID>Sample Chat Client</AppID>
      <SessionID>yoursessionidwillbehere</SessionID>
    </ChatClientInfoHeader>


For a more complete example, see Answer ID 8129: Chat API Example Chat Session

Available Languages for this Answer:

Notify Me
The page will refresh upon submission. Any pending input will be lost.