// Login data
$apikey = 'your-api-key';
$auth_token = '';

//Make Login Request
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/Login',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ' . $apikey . ''
),
));

$response = curl_exec($curl);
$response = json_decode($response, true);

curl_close($curl);

//Save Auth Token from Login function
$auth_token = $response['auth_token'];

//Get all activities
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/GetAllActivities',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ' . $auth_token . ''
),
));

$all_activities = curl_exec($curl);

curl_close($curl);

//Print all activities
print_r($all_activities);
chat