比方说,我想设置一个触发器,每1000条短信触发一次。在创建触发器时,像下面的接口文档中的触发器一样,如何重置TriggerBy字段才能触发下1000个触发器?
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library
// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "AC828da6a8765c3edaf2727d241dc68b87";
$token = "{{ auth_token }}";
$client = new Services_Twilio($sid, $token);
$trigger = $client->account->usage_triggers->create("sms", "1000", "http://www.example.com/", array());
echo $trigger->sid;发布于 2015-06-25 03:52:34
Twilio开发者布道者在这里。
如果你想让你的触发器重复出现,你可以使用下面的代码:
$trigger = $client->account->usage_triggers->create("sms", "1000", "http://example.com", array("Recurring"=>"daily"));这将通知你每一天,当你点击1000条短信。如果您希望在短于每天的时间内收到通知,则必须为每个增量(1000、2000、3000、4000)设置一个警报触发器。
希望这能有所帮助!
https://stackoverflow.com/questions/29686872
复制相似问题