Laravel 拉雷维尔——”;未找到请求的资源/2010-04-01/Accounts//Messages.json;
我是Twilio试用版,使用Laravel-5.8发送短信。当我在POSTMAN上测试POST请求时,我得到了以下错误: “未找到请求的资源/2010-04-01/Accounts//Messages.json” 我检查了文档,但无法解决问题Laravel 拉雷维尔——”;未找到请求的资源/2010-04-01/Accounts//Messages.json;,laravel,twilio,Laravel,Twilio,我是Twilio试用版,使用Laravel-5.8发送短信。当我在POSTMAN上测试POST请求时,我得到了以下错误: “未找到请求的资源/2010-04-01/Accounts//Messages.json” 我检查了文档,但无法解决问题 public function sendSMS() { // initialize message array $message_array = array( 'sender_id' => 'Kiu
public function sendSMS()
{
// initialize message array
$message_array = array(
'sender_id' => 'Kiunds9ef6f6dgsdfe58946dcbudheF',
'sender_secret' => '45hghds3173yhrd4aaf9ffgfgd',
'reciver_mobile' => '+2337098760794',
'otp' =>'905456',
'sender' => '+449887532'
);
// This will send OTP only
$sms_response = Twilio::message($message_array,$op="otp only", false, true, false ); // otp
return response()->json($sms_response,200);
}
我本想在手机上收到一条消息,但出现了上面显示的错误。如果您看到url,在“messages.json”前面有一个双“/”:
../messages.json
@Kenny Homa-我在哪里找到它?@midowu检查这个答案。
Route::post('send_sms','ApiController@sendSMS');