skip to Main Content

403 Forbidden on Server (API, Laravel) – Php versions

local works but in production it returns 403. Same PHP and Laravel version. Is there anything i can do? $url = 'https://admin.appmax.com.br/api/v3/order/'.$order_id.'?access-token='.$token; $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => $url, CURLOPT_HTTPHEADER => ['Content-Type: application/json'], CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_POST => true,…

VIEW QUESTION

PHP curl to github rest api does not return anything

Based on https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28 I have this code: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.github.com/repos/octocat/Hello-World/commits"); $headers = [ 'Accept: application/vnd.github+json', 'Authorization: Bearer <my personal token>', 'X-GitHub-Api-Version: 2022-11-28' ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $server_output = curl_exec($ch); curl_close($ch); print $server_output ; But it does not…

VIEW QUESTION
Back To Top
Search