Whats the error you are getting?
Is $token a valid access token for the API?
$token
Which echo line is echo-ing?
echo