20 lines
470 B
PHP
20 lines
470 B
PHP
<?php
|
|
$apiKey = 'sk_mlq1j3na_4a676ewvaop';
|
|
$url = "https://shalom-api.lat/api/v1/agencies";
|
|
|
|
$ch = curl_init();
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
|
'Accept: application/json',
|
|
"Authorization: Bearer {$apiKey}"
|
|
]);
|
|
|
|
$response = curl_exec($ch);
|
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
|
curl_close($ch);
|
|
|
|
echo "HTTP Code: $httpCode\n";
|
|
echo "Response: $response\n";
|
|
|