The reason I was receiving a bad response is because I needed:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
After I inserted that line, I was able to acquire my tokens. Hopefully this is helpful.
The correct option to set header is CURLOPT_HTTPHEADER and unfortunately you are using CURLOPT_HEADER. That's why your authorization header is not set with curl request.
CURLOPT_HTTPHEADER
CURLOPT_HEADER
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);