What is the $token like in your case? it should be something like "Bearer tokenstring". You can test the REST API alone via POSTMAN.
$token = $_GET['code']; . . $headr[] = "Authorization:$token";
What is the $token like in your case? it should be something like "Bearer tokenstring". You can test the REST API alone via POSTMAN.
$token = $_GET['code']; . . $headr[] = "Authorization:$token";