Skip to content

Instantly share code, notes, and snippets.

@phamquocbuu
Created April 25, 2020 14:04
Show Gist options
  • Save phamquocbuu/584f37f6c0b9c9ba772814c1727e0dc9 to your computer and use it in GitHub Desktop.
Save phamquocbuu/584f37f6c0b9c9ba772814c1727e0dc9 to your computer and use it in GitHub Desktop.
Xem token này đã subscribe những topic nào
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://iid.googleapis.com/iid/info/DEVICE_TOKEN?details=true",
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: key=SERVER_KEY",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment