I have about 45000 tokens for which I need to send a push notification.
I send them via curl_multi_exec
and get roughly 39000 responses from apple.
Majority with status 200 (38650, eg), 300 with status 410 (Unregistered), 50 with status 0 and an empty response body (which is very strange).
But the question remains: where did 6000 requests go? Maybe these 6000 are 400(BadDeviceToken) or 410(Unregistered)?
Example curl parameters:
$curl_option_arr = [
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_2_0,
CURLOPT_PORT => 443,
CURLOPT_HTTPHEADER => [
"apns-topic: $apns_topic",
"authorization: bearer $jwt"
],
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => m_json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true,
CURLOPT_TIMEOUT => 10,
];
Any ideas what could be wrong?