3
I am using a WS API in JSON
that 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 game in browser gets
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 will use the PHP API
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);
returns me the following error
Notice: Undefined variable: filter in C: xampp htdocs Maps json.php on line 54
Warning: file_get_contents(https://api.movidesk.com/public/v1/persons?token=52ee6ca5-8639-422b-bafe-470013c11176&$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
Try to remove the dollar sign from
&$filter
or slip&\$filter
– rray