CreateTask.php 654 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. use Volc\Service\Notify;
  3. require('../../../vendor/autoload.php');
  4. require('../../src/Service/Notify.php');
  5. $client = Notify::getInstance();
  6. $client->setAccessKey("your ak");
  7. $client->setSecretKey("your sk");
  8. $body = [
  9. 'Name' => '你好2222',
  10. 'Resource' => '9b39e17fb12444c78f20d6551469a6f0',
  11. 'Type' => 0,
  12. 'NumberPoolNo' => 'NP162213338604093530',
  13. 'Concurrency' => 2,
  14. 'PhoneList' => [
  15. [
  16. 'Phone' => 'your phone',
  17. ]
  18. ],
  19. 'StartTime' => '2022-05-18 00:00:00',
  20. 'EndTime' => '2022-05-15 18:00:00',
  21. 'SelectNumberRule' => 5,
  22. ];
  23. $response = $client->CreateTask($body);
  24. echo $response;