http requests to /tracks/{id} a 403 status code from AWS other cloud providers, however 200 locally

♀尐吖头ヾ 提交于 2019-12-06 10:39:36

I don't know if it's related, but I had some issues with tokens and curl using PHP.

In the end I added the SSL options to my curl request and that solved my issue.

Code snippet

try {
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  ...
  curl_setopt($ch, CURLOPT_VERBOSE, 1);
  $info = curl_getinfo($ch);
  $response = curl_exec($ch);
  $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
  $header = substr($response, 0, $header_size);
  $body = substr($response, $header_size);      
  $result = $body;
  ...
  curl_close($ch);
} catch(Exception  $e) {
  $this->writeLog('authToken() Error Message: ' .$e->getMessage());
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!