question

Ismael Torres avatar image
Ismael Torres asked Phong Vu edited

MMS Not Working

Hello, I have a custom app that is using cURL. I have worked on a couple of end points and all seem to be working perfectly. However when I test this endpoint:

https://platform.ringcentral.com/restapi/v1.0/account/accountId/extension/extensionId/mms


It does not want to work. When I go to the RingCentral API website and try the end point there via the interface it complains about a wrong phone number, even though it is correct. It is the same phone number i use on the SMS end point and works perfectly.

screen-shot-2021-03-19-at-25758-pm.png

rest api
1 |3000

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

Phong Vu avatar image
Phong Vu answered

Can you try one of the programming language codes from the link below?

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

1 |3000

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

Ismael Torres avatar image
Ismael Torres answered Phong Vu commented

Sorry but for my app it has to be done with cURL

1 comment
1 |3000

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

Phong Vu avatar image Phong Vu ♦♦ commented ·

What I was asking you to do was for double checking to see if your account, number and content are correct and works well. If it works with the code then we know the way you call cCurl is the problem.

0 Likes 0 ·
Daniel Lopez avatar image
Daniel Lopez answered

I have the same problem, but i use python.

My SMS app works perfectly, but when i try to send a MMS i get the phone number error

1 |3000

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

Ismael Torres avatar image
Ismael Torres answered

Just to clarify a bit more, I have been using the SMS end point with cURL and it works perfectly but the MMS is giving wrong Phone Number error. When I go to the RingCentral API website and test out the MMS end point, I also get the same error, in other words it looks like it is also broken on their site.

1 |3000

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

Phong Vu avatar image
Phong Vu answered

Can you both call thing this API and detect if your number support "MmsSender" feature?

Using the RingCentral Python SDK, the code is something like this:

from ringcentral import SDK

RECIPIENT = '<ENTER PHONE NUMBER>'

RINGCENTRAL_CLIENTID = '<ENTER CLIENT ID>'
RINGCENTRAL_CLIENTSECRET = '<ENTER CLIENT SECRET>'
RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com'

RINGCENTRAL_USERNAME = '<YOUR ACCOUNT PHONE NUMBER>'
RINGCENTRAL_PASSWORD = '<YOUR ACCOUNT PASSWORD>'
RINGCENTRAL_EXTENSION = '<YOUR EXTENSION, PROBABLY "101">'

rcsdk = SDK( RINGCENTRAL_CLIENTID, RINGCENTRAL_CLIENTSECRET, RINGCENTRAL_SERVER)
platform = rcsdk.platform()
platform.login(RINGCENTRAL_USERNAME, RINGCENTRAL_EXTENSION, RINGCENTRAL_PASSWORD)

def read_extension_phone_number():
  resp = platform.get("/restapi/v1.0/account/~/extension/~/phone-number")
  jsonObj = resp.json()
  for record in jsonObj.records:
    for feature in record.features:
      print (feature)

read_extension_phone_number()


1 |3000

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

Ismael Torres avatar image
Ismael Torres answered Phong Vu edited

Unfortunately I cannot test it with Python, however if you go to the RingCentral API website:

https://developers.ringcentral.com/api-reference/SMS/createMMS
If you test that end point out, it will work without an attachment, it will run perfectly. However if you add an attachment to the MMS it gives you a phone number error.

3 comments
1 |3000

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

Phong Vu avatar image Phong Vu ♦♦ commented ·

That is why I asked you to check if your number support MMS.

You can cCURL to send a message. You CANNOT cCURL to get your number info?

0 Likes 0 ·
Ismael Torres avatar image Ismael Torres Phong Vu ♦♦ commented ·

I checked and yes my number does support MMS

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Ismael Torres commented ·

So you copy the curl from the trial in the dev portal?

Try this with your number and content

curl --request POST \
--url 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/mms' \
--header 'accept: application/json' \
--header 'authorization: Bearer your-access-token' \
--header 'content-type: multipart/form-data' \
--data '{"from":{"phoneNumber":"+1xxxxxxxxxx"},"to":[{"phoneNumber":"+1xxxxxxxxxx"}],"text":"Test","attachments":["data:image/png;name=creation-date.png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAYA xxxxxxxx"]}'


0 Likes 0 ·

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