0
twilio API를 통해 대용량 SMS를 보내려고합니다. 단일 API 요청에서 모든 전화 번호의 배열을 전달하는 메소드가 있습니까?for 루프없이 twilio api에서 대용량 SMS를 보내는 방법
twilio API를 통해 대용량 SMS를 보내려고합니다. 단일 API 요청에서 모든 전화 번호의 배열을 전달하는 메소드가 있습니까?for 루프없이 twilio api에서 대용량 SMS를 보내는 방법
개발자 전도사 Twilio가 여기 있습니다.
예 있습니다! passthrough API으로 알려져 있습니다 (여러 다른 메시징 시스템을 통과하고 대량 메시지를 보낼 수 있으므로 Notify API의 일부이므로 대량 SMS 메시지를 보낼 때 사용할 수 있습니다.) 메시징 서비스와 알림 서비스를 설정해야합니다 콘솔에서, 당신은 다음과 같은 코드를 사용할 수 있습니다.
<?php
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php';
use Twilio\Rest\Client;
// Your Account SID and Auth Token from https://www.twilio.com/console
$accountSid = "your_account_sid";
$authToken = "your_auth_token";
// your notify service sid
$serviceSid = "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
// Initialize the client
$client = new Client($accountSid, $authToken);
// Create a notification
$notification = $client
->notify->services($serviceSid)
->notifications->create([
"toBinding" => [
'{"binding_type":"sms", "address":"+15555555555"}',
'{"binding_type":"sms", "address":"+12345678912"}'
],
"body" => "Hello Bob"
]);
체크 아웃 the documentation on sending multiple messages with the Notify passthrough API for all the details을
을 이것에 의하여 우리는 하나의 API 호출로 MSG를 보낼 수 없습니다. –