Hello sir, can you please tell me this:
In my ServiceM8 account, there is a Defect Identified form that also contains images. When I fetch this form using the API, I receive the image UUID. After that, I added an endpoint to get the image, but it is returning a 400 Bad Request.
This is my PHP cURL code.
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => '''https://api.servicem8.com/api_1.0/photo/2466f24f-3a6b-4e5c-b7ed-23ba1e49a13b.json''', 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( '''x-api-key: smk-496ab7-4d930c3caeda4e02-c7ec8da1a99f8193''', '''Accept: application/json''' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; Please tell me where the problem is. Please tell me where the problem is.