node-wit icon indicating copy to clipboard operation
node-wit copied to clipboard

Invalid session id

Open kevohagan opened this issue 9 years ago • 8 comments

Im trying a basic http post for the converse endpoint but I keep getting the invalid session id error. Documentation on this is very sparse https://wit.ai/docs/http/20160511#post--converse-link , it says "A specific ID of your choosing representing the session your query belongs to". I can't really understand what to do with this, since I guess it's some random number I can generate no? Where does this get checked?

Thanks in advance for your help! :)

kevohagan avatar May 20 '16 14:05 kevohagan

Do you guys know anything about this? Thanks! :)

kevohagan avatar May 24 '16 08:05 kevohagan

facing same issue ... any idea?

manishkatyan avatar May 28 '16 11:05 manishkatyan

You might have invalid characters in your sessionId. I tried to use phone numbers as the sessionId and Wit rejected them.

descrip avatar Jun 29 '16 18:06 descrip

When I use mongo id like '577ad956c6b4c91a00e42459', Wit returns ' Error: Oops, I don't know what to do.' but when I use datetime like '2016-07-11T14:55:07', it works fine. =/

Does sessionId have a characters limit? It looks like it has a 9-character limit.

hjbramos avatar Jul 11 '16 15:07 hjbramos

I'm curious why findOrCreateSession inexamples/messenger.js doesn't use the the Facebook ID (fbid) as the session ID.

Creating a session ID from a date, albeit in milliseconds, is not guaranteed to be unique, as two sessions can be created in the same millisecond.

I tried using fbid as the session ID, it worked for a while, then I got the dreaded Oops, I don't know what to do. error, so I switched back to the date implementation, and the error went away.

guarani avatar Sep 26 '16 01:09 guarani

face same issue,

bilalbayasut avatar Nov 05 '16 09:11 bilalbayasut

I'm having this issue all of a sudden too. Now it won't accept new Date().toISOString(), basic strings or FB ID's. Has anyone found a solution?

darkostanimirovic avatar Dec 09 '16 18:12 darkostanimirovic

I put Facebook user's ID as query string and it works.

POST https://api.wit.ai/converse?session_id=123456789

thibaultboursier avatar Mar 04 '17 21:03 thibaultboursier