2017-03-03 21 views
0

我正在使用Aloha/Twilio包与我的laravel应用程序发送短信从我的应用程序移动。Laravel- Twilio短信卡在排队

所有配置完全按照给定链接中的描述完成。 当我做

$twilio = new \Aloha\Twilio\Twilio(env('TWILIO_SID'), env('TWILIO_TOKEN'), env('TWILIO_FROM')); 
dd($twilio->message('+#########', 'this is test')); 

我看到的响应

Services_Twilio_Rest_Message {#285 ▼ 
    #subresources: array:1 [▶] 
    +"client": Services_Twilio {#254 ▶} 
    +"sid": "MY SID" 
    +"date_created": "Fri, 03 Mar 2017 06:51:11 +0000" 
    +"date_updated": "Fri, 03 Mar 2017 06:51:11 +0000" 
    +"date_sent": null 
    +"account_sid": "ACOUNT SID" 
    +"to": "+###########" 
    +"from": "+15005550006" 
    +"messaging_service_sid": null 
    +"body": "Sent from your Twilio trial account - this is test" 
    +"status": "queued" 
    +"num_segments": "1" 
    +"num_media": "0" 
    +"direction": "outbound-api" 
    +"api_version": "2010-04-01" 
    +"price": null 
    +"price_unit": "USD" 
    +"error_code": null 
    +"error_message": null 
    +"uri": "/2010-04-01/Accounts/ACe6bc0a30f091bbbcdd33de2a86ad68c8/Messages/SMd3e7591a45754b9db3aa62304a5791a6" 
    +"subresource_uris": {#284 ▶} 
} 

我现在用的幻数为From数即发送短信,我使用与我的应用测试凭证。

我所有的消息都在状态被显示为queued

回答

1

Twilio开发者传道这里。

如果您使用的是test credentials和幻数,那么这些消息将永远不会被发送。发送消息的唯一方法是使用真实凭证和实际数字。如果您仍然在试用帐户上,那么您可以使用您在Twilio控制台中验证的任何号码执行此操作,并且这些消息不会花费任何费用。

让我知道这是否有帮助。

+0

谢谢,它有帮助。我用真正的凭据和实际的号码,并得到了短信 – baig772