0

I am Twilio trial version with Laravel-5.8 to send SMS. When I tested the POST Request on POSTMAN, I got this error:

"The requested resource /2010-04-01/Accounts//Messages.json was not found"

I checked the documentation, but could not solve the problem.

  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);
  }   
Route::post('send_sms','ApiController@sendSMS');

I expected to get a message on my phone, but got the error shown above.

midowu
  • 937
  • 5
  • 19
  • 40

0 Answers0