Get a nonce (or secret) to use with the Khoros Flow Socket API

Details

To start a connection you'll need to make a GET call to the socket.info API method to the API endpoint at https://sdk.flow.ai. This provides a temporary WebSocket URL.

The socket.info method requires a secret, sessionId, clientId, and a threadId.

Additional JavaScript examples

var client = new RestClient("https://sdk.flow.ai/socket.info");
var request = new RestRequest(Method.GET);

request.AddHeader("x-flowai-secret", "SECRET");
request.AddHeader("x-flowai-threadid", "THREAD_ID");
request.AddHeader("x-flowai-clientid", "CLIENT_ID");
request.AddHeader("x-flowai-sessionid", "SESSION_ID");

IRestResponse response = client.Execute(request);
var request = NSMutableURLRequest(URL: NSURL(string: "https://sdk.flow.ai/socket.info/?clientId=YOUR_CLIENT_ID&sessionId=1234")!,
                                        cachePolicy: .UseProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.addValue("SECRET", forHTTPHeaderField: "x-flowai-secret")
request.addValue("THREAD_ID", forHTTPHeaderField: "x-flowai-threadid")
request.addValue("CLIENT_ID", forHTTPHeaderField: "x-flowai-clientid")
request.addValue("SESSION_ID", forHTTPHeaderField: "x-flowai-sessionid")
Language