You need to sign in to do that
Don't have an account?
Manoj M
ChasitorInit : Session required but was invalid or not found
Creating sessionId is working fine:
https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_SessionId.htm
I am trying to create a chat visitor session but I am getting the error: "Session required but was invalid or not found".
https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_ChasitorInit.htm
Headers: Authorization: 'Bearer xxxx', 'X-LIVEAGENT-API-VERSION': '48', 'X-LIVEAGENT-SESSION_KEY': 'xxxxxxxx', // key from sessionId request 'X-LIVEAGENT-AFFINITY': 'xxxxxxxx', // affinityToken from sessionId 'X-LIVEAGENT-SEQUENCE': '1' Request Body: sessionId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', organizationId: '00Dxxxxxxxxxxxxx', deploymentId: '572xxxxxxxxxxxx', buttonId: '573xxxxxxxxxxxx', userAgent: '', language: 'en-US', screenResolution: '2560x1440', visitorName: 'Test', prechatDetails: [], prechatEntities: [], receiveQueueUpdates: true, isPost: true
This error usually occurs if POST request to initiate chat session has not been done immediately after getting the response from the GET Request.
There's a timeout value for the session. It's recommended that you have two REST Console windows opened so that you can quickly change from one request to another.
Please mark this answer as best so that other community members can be helped.
Thank you
I used to get the same issue despite I posted second request right after getting session ids. After spending a day of painful investigations I've finally found the problem: in this help article (https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_ChasitorInit.htm)there is a bad header param description. It should be X-LIVEAGENT-SESSION-KEY header name, NOT X-LIVEAGENT-SESSION_KEY (dash instead of underscore!!!).
The problem is in 47,48 versions articles. Below 46 it written right.
Hope it helps!