触发一个 Twilio 流执行到一个联系通道地址,而另一个对相同号码的执行仍然处于活动状态

Triggering a Twilio flow execution to a contact channel address while another execution to the same number is still active

在另一个执行仍在进行时将 twilio 流执行触发到相同的编号将发送相同执行 ID 的响应,而不会表明此执行不是新执行:

这是第一次触发执行的响应:

 {
   status: 'active',
   date_updated: null,
   contact_channel_address: 'xxxxx',
   account_sid: 'xxxx',
   url: 'https://studio.twilio.com/v1/Flows/xxxx/Executions/FN519a25c6d932799cb8d1dc5bf78b489c',
   context: {},
   sid: 'FN519a25c6d932799cb8d1dc5bf78b489c',
   date_created: '2022-05-18T11:53:31Z',
   contact_sid: 'xxx',
   flow_sid: 'xxx',
   links: {
     steps: 'https://studio.twilio.com/v1/Flows/xxx/Executions/FN519a25c6d932799cb8d1dc5bf78b489c/Steps',
     execution_context: 'https://studio.twilio.com/v1/Flows/xxx/Executions/FN519a25c6d932799cb8d1dc5bf78b489c/Context'
   }

这是第二次触发执行的响应:

{
   status: 'active',
   date_updated: null,
   contact_channel_address: 'xxx',
   account_sid: 'xxx',
   url: 'https://studio.twilio.com/v1/Flows/xxx/Executions/FN519a25c6d932799cb8d1dc5bf78b489c',
   context: {},
   sid: 'FN519a25c6d932799cb8d1dc5bf78b489c',
   date_created: '2022-05-18T11:53:32Z',
   contact_sid: 'xxx',
   flow_sid: 'xxx',
   links: {
     steps: 'https://studio.twilio.com/v1/Flows/xxx/Executions/FN519a25c6d932799cb8d1dc5bf78b489c/Steps',
     execution_context: 'https://studio.twilio.com/v1/Flows/xxx/Executions/FN519a25c6d932799cb8d1dc5bf78b489c/Context'
   }
 }

使用 Executions 资源的 v2,它将 return 409 响应。

Differences Between v1 and v2