简体   繁体   English

如何将html链接传递给nexmo sms响应

[英]How to pass html link to nexmo sms response

I want to pass html link in the nexmo sms response once the order is confirmed. 一旦确认订单,我想在nexmo sms响应中传递html链接。 but it is taking it as a text. 但它把它作为一个文本。

Here is the code : 这是代码:

$api_key = '********';
$api_secret = '***************';
$number = '*************';
$message = 'Your order has been placed.';
$message .= "<a href='accounts/download_order/'>Download your tickets</a>";
$url = 'https://rest.nexmo.com/sms/json?' . http_build_query([
                                        'api_key' => $api_key,
                                        'api_secret' => $api_secret,
                                        'to' => $number,
                                        'from' => 'NexmoWorks',
                                        'text' => $message
                                    ]); 

It is not possible to include this in an SMS, you can only include the full URL as plain text - How that URL is displayed will depend on the end-users phone/OS. 无法将其包含在SMS中,您只能将完整URL包含为纯文本 - 该URL的显示方式取决于最终用户的电话/操作系统。

Example below; 以下示例;

$url = 'https://rest.nexmo.com/sms/json?';
$url .= http_build_query([
    'api_key' => $api_key,
    'api_secret' => $api_secret,
    'to' => $number,
    'from' => 'NexmoWorks',
    'text' => $message
]); 

<a> tags are not support in SMS SMS中不支持<a>标签

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM