如何将 html link 传递给 nexmo 短信响应
How to pass html link to nexmo sms response
我想在订单确认后在 nexmo 短信回复中传递 html link。但它把它当作文本。
这是代码:
$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
]);
无法将其包含在短信中,您只能将完整的 URL 作为纯文本包含 - 如何显示 URL 将取决于最终用户 phone/OS.
示例如下;
$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>
短信不支持标签
我想在订单确认后在 nexmo 短信回复中传递 html link。但它把它当作文本。
这是代码:
$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
]);
无法将其包含在短信中,您只能将完整的 URL 作为纯文本包含 - 如何显示 URL 将取决于最终用户 phone/OS.
示例如下;
$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>
短信不支持标签