Hi, Phil,
Many thanks! I'm getting the token, but I'm now getting a 403 return from /rest/v1/realtime/by-xid/[xid] call. I'm setting headers as follows (this is in PHP):
// Initialize curl options
$this->_curl_options = array(
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_HEADER => TRUE,
CURLOPT_VERBOSE => TRUE,
CURLOPT_TIMEOUT => $this->_curl_timeout,
);
$headers = array(
'Accept: application/json',
'Accept-Encoding: gzip',
'Accept-Language: en-US,en;q=0.5',
'Connection: keep-alive',
'Cache-Control: no-cache',
"X-XSRF-TOKEN: {$this->_token}",
);
$this->_curl_options[CURLOPT_HTTPHEADER] = $headers;
$this->_curl_options[CURLOPT_USERAGENT] = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0";
$this->_call_api();
Then, the _call->api() method makes the call:
$this->_curl_options[CURLOPT_URL] = $this->call_string;
$curl = curl_init();
curl_setopt_array($curl, $this->_curl_options);
// Make the call
$response = curl_exec($curl);
curl_close($curl);
Is this the right way to send the authentication token on the second call?
Thanks!