php - Unable to send high priority notification with FCM payload

one text

Be informed we are trying to send high priority FCM push notification (video call purpose) using the payload given in https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message. Based on the payload, we tried implementing it as PHP - CURL request, but somehow push notification is not immediately received as we though it be. We are not sure whether we set the parameters right in the code. The code is as given below:

define('API_ACCESS_KEY','##');

$fcmUrl = 'https://fcm.googleapis.com/fcm/send';

$token="###";

$data = [
            'title' =>$title,
            'body' =>$msg,
            'image'=>'https://mbracecloud.com/appln_enterprise/images_user/5000350004651664275771-2.jpg',
            'uri'=>"",
            'tag'=>'Receive'
    ];
//$extraNotificationData = ["message" => data];

$priority = [
            'priority' =>"high",
    ];
        
$fcmNotification = [
            //'registration_ids' => $tokenList, //multple token array
            'to'        => $token, //single token
            'priority' =>"high",
            'fcm_options' =>$notis,
            'data' => $data,
            'image'=>'https://mbracecloud.com/appln_enterprise/images_user/5000350004651664275771-2.jpg',
            'uri'=>"https://mbracecloud.com/index_n.php?vsn=9302010101&nf=Yes&cnt=India&window=1&connect=Mail&mail=business@mbracecloud.com"
        ];

$headers = [
            'Authorization: key=' . API_ACCESS_KEY,
            'Content-Type: application/json'
    ];


$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$fcmUrl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fcmNotification));
$result = curl_exec($ch);
curl_close($ch);
echo $result;
echo $token;

Please guide us as where we are going wrong.

Source