Wordpress SMS API integration without plugin
I am struggling with SMS sending in WordPress without plugin, I have a, API, but that API is not working. Example:
function mysite_woocommerce_order_status_processing( $order_id ) {
$mobile="123456";
$url="****/api.php?username=******password=1234source=UPDATEdmobile=".$mobile."message='.$msg.' ";
$response = wp_remote_get( $url );
//print_r($response);
}
add_action( 'woocommerce_order_status_processing','mysite_woocommerce_order_status_processing' );
I am struggling with above hook, I can send Email through that hook, but not SMS. It would be great if any WordPress developer help me out !
Getting SyntaxError:
JSON.parse: unexpected character at line 1 column 1 of the JSON data