Hi,
I am trying to send MMS from app.js side using Ajax but authorization can’t work there because of secure parameters and ajax call consider that authorization as just a string so obviously It would not work. And other way I tried using client.request.post but I can’t pass formData through this request. So is there any way that i can upload image and get the image URL path then i can send further?
Code Sample:
Ajax:
$.ajax({
type: "POST",
url: `${middlewareUrl}/${TWILIO_PLUS.getMiddleUserID()}/sms/reply`,
headers: {
"Authorization": "Bearer <%= iparam.global_access_token %>",
"Content-Type": "application/json",
"Accept" : "application/json" },
data: form,
processData: false,
contentType: false,
Cheers,