Uploading image URL to send third party platforms

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,

Do you think the following article can help?

https://community.developers.freshworks.com/docs?search=form&topic=384

It describes using form data using client method. :grinning_face_with_smiling_eyes:

Hi @Saif

I tried this solution but its not working, Here is the error I am getting in the console .

Console Screen SHot:

Code Sample:

Please guide me how to send file with formData?

Cheers,