Here is a code sample, showing how to authenticate and use one of our API endpoints, when coding in PHP (curl command).
<?php // api endpoint $apiendpoint = 'https://api.transmitsms.com/send-sms.json'; // api key $apikey = 'e898ef5f67f0f73d88ef97624bacf614'; // api secret $apisecret = 'dkjfkdjf@dkfjdkA'; // send sms post body $post = [ 'to' => '614111', 'message' => 'testing 1 2 3' ]; $params = http_build_query($post); $ch = curl_init($apiendpoint); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch, CURLOPT_POST, 1 ); curl_setopt( $ch, CURLOPT_POSTFIELDS, $params ); curl_setopt( $ch, CURLOPT_HTTPHEADER, [ 'content-type: application/x-www-form-urlencoded', 'Authorization: Basic ' . base64_encode("$apikey:$apisecret") ] ); $res = curl_exec( $ch ); curl_close( $ch ); echo $res; ?>
The API key and API secret can be found in the Settings screen of your Burst SMS account.
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.