I'm using a WS API in JSON
the URL is
https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&$filter=profileType eq 2
which is the example in which the API documentation passes. when playing in the browser is
https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&$filter=profileType%20eq%202
But the information appears
My problem is when I use the API in PHP
Example
<?php $json = file_get_contents("https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&$filter=profileType%20eq%202");
$cliente = json_decode($json);
I get the following error
Notice: Undefined variable: filter in C: \ xampp \ htdocs \ Maps \ json.php on line 54
Warning: file_get_contents ( link $ filter = profileType% 20eq% 202): failed to open stream: HTTP request failed! HTTP / 1.1 500 Internal Server Error in C: \ xampp \ htdocs \ Maps \ json.php on line 54