John Davidson

MessageBird sms not sending (php)

0 comments
Message:


I have been trying to send SMS messages with PHP using MessageBird. Currently I'm getting no error messages but I'm not receiving the messages on my phone, but I can see my free SMS credits being deducted.




<?php

require('header.php');
require 'php-rest-api-master/autoload.php';

$client = new \MessageBird\Client('YOUR_ACCESS_KEY'); // Access key goes here

$message = new \MessageBird\Objects\Message();
$message->originator = 'Test';
$message->recipients = ['YOUR_PHONE_NUMBER'];
$message->body = 'Hello, your meeting request has been processed';

try{
$response = $client->messages->create($message);
} catch (Exception $e){
echo $e->getMessage();
}

require('footer.php');

?>


My Answer:
There could be a few reasons why your SMS messages are not being sent successfully through MessageBird. Here are some troubleshooting steps you can try:

1. Check if the phone number you are sending the SMS to is correct and in the correct format (including country code).
2. Make sure that your MessageBird API key is correctly configured in your PHP code.
3. Check if your phone number is correctly verified in your MessageBird account.
4. Verify that your MessageBird account is not blocked or suspended for any reason.
5. Check if there are any restrictions on sending SMS messages to the destination country.
6. Ensure that your server has internet connectivity and can communicate with the MessageBird API endpoint.
7. Check if there are any firewall or security settings blocking the outgoing SMS messages.

If you have tried all of the above steps and are still facing issues, you may want to reach out to MessageBird support for further assistance. They may be able to provide more specific guidance based on your account and configuration settings.

Rate this post

3 of 5 based on 7376 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us