Client and Auth dont match

I’m not a PHP coder, but I suspect that

  • your second call to curl_setopt is overwriting the first
  • you need to specify both Client-ID and Authorization headers in a single call, something like
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Client-ID: ' . $clientID, 'Authorization: Bearer ' . $token]);