Closed VinceSanityyy closed 4 years ago
It seem's like you're passing an array instead JSON format.
Change:
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
to
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode( array( 'address' => '+639270277397', 'message' => 'Hello from API' ) ) );
Yah, thanks for the info @joyfementira . I already resolved it by
$postData = [
'address' => '+639270277397',
'message' => 'Hello from API',
];
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postData));
Seems i did not read well the docs
I used curl in accessing the api. I based it in your docs which is something like this
I followed it in php curl and only using REQUIRED parameters by
What am i getting is
"{"detail":"JSON parse error - Expecting value: line 1 column 1 (char 0)"}"
Can someone tell me what is wrong? Pls correct me.