question

Sonika k avatar image
Sonika k asked ·

I want to pass attatchment with sms using rest api in apex

I have written apex code to send sms its working fine but now i need to send the attatchment with same

I have converted same in Blob But not getting how to pass same as parameter in smsbody

String smsBody = '{"from":{"phoneNumber":"' + fromPhoneNumber + '"},"text":"' + message+ '","to":[{"phoneNumber":"'+ tonumber+'"}]}';

sms with attatchment
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

· Write an Answer
Phong Vu avatar image
Phong Vu answered ·

I am not an expert on SF Apex, but you can use this REST API to send MMS message (SMS with attachment)

https://developers.ringcentral.com/guide/messaging/sms/sending-images

1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys