php-ovh icon indicating copy to clipboard operation
php-ovh copied to clipboard

SMS Sender is not displayed correctly via OVH SMS Service with Sending Jobs API

Open mohamedTaiebBsf opened this issue 2 years ago • 1 comments

I successfully sent an SMS using the OVH SMS service through the Sending Jobs API (POST API: /sms/{serviceName}/jobs).

However, upon receiving the message, I noticed that the specified sender information was not taken into consideration. Instead of seeing the sender name "SOCIETY" the recipient only sees a numeric sender ID in the "from" section of the SMS.

Below is the code snippet I used for sending the SMS:

$smsServices = $ovh->get('/sms/');

$message = [
    "charset" => "UTF-8",
    "class" => "phoneDisplay",
    "coding" => "7bit",
    "message" => sprintf('SOCIETY - Code de vérification: %s', $code),
    "noStopClause" => false,
    "sender" => "SOCIETY",
    "priority" => "high",
    "receivers" => [$this->formatPhoneNumber($phoneNumber)],
    "senderForResponse" => true
];

$ovh->post('/sms/' . $smsServices[0] . '/jobs', $message);

I have verified that the payload includes the "sender" option with the desired sender name. However, it seems that the sender name is not being properly displayed to the recipients, and instead, only the numeric sender ID is shown.

I would appreciate any assistance or insights on how to resolve this issue and ensure that the sender name "SOCIETY" is correctly displayed when sending SMS messages via the OVH SMS service.

Thanks.

mohamedTaiebBsf avatar Jul 21 '23 14:07 mohamedTaiebBsf

Hi, I send with similar parameters. If you want to display a number for a response, you need to set "senderForResponse" to true. If you want to display a name but recipients won't be able to respond you need to set "senderForResponse" to false or unset and specify "sender".

Inglebard avatar Aug 17 '23 13:08 Inglebard