API Response = null

In addition to what @tal said, you can add

curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);

to make curl follow redirects. It’s in general a very good idea to do.

1 Like