rest chat api error
Summary
its giving internal error please help me fix itCode Snippet
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://xxxxxx/services/rest/crossChannelServices/v1.4/establishSessions', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "sessionInformation": "{\\"emailAddress\\":\\"[email protected]\\", \\"firstName\\":\\"Ruman\\", \\"lastName\\":\\"Nisar\\", \\"question\\":\\"Test Chat\\", \\"auxiliaryData\\": {\\"BROWSER\\":\\"Firefox\\", \\"OPERATING_SYSTEM\\":\\"iPhone OS\\", \\"USER_AGENT\\":\\"Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1\\"}}" }', CURLOPT_HTTPHEADER => array( 'OSvC-CREST-Application-Context: chat-api', 'Authorization: Basic ', 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;
0