Use this method to obtain a sessionToken. Use this sessionToken to start a session and track atomic actions within this session.
client.generateSession().then(function(response){
//...
});
To start a session see method setSessionData.
This method does not have any mandatory parameters.
This method does not have any options.
This method calls the Knowledge API’s POST /inbtrck/session
endpoint. Please refer to the Responses section of that endpoint on the Knowledge API Routes page for the response format.
The following example will start a session after generating a sessionToken:
var sessionToken = "";
var sessionId = "";
client.generateSession().then(function(response){
sessionToken = response.data.sessionToken;
sessionId = response.data.sessionId;
client.setSessionData({sessionToken, sessionId});
});