2017-10-31 15 views

답변

0

개발자 전도사 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