question

Bijay Lama avatar image
Bijay Lama asked Phong Vu commented

Cannot access the received image

I am trying to access the image that I have sent or received via SMS by appending the access token as a query parameter in the media.ringcentral.com content URL. All the images that I have sent are being accessible but it is showing unauthorized for the received images.

sms and text messagingauthentication
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

Share the code how you read those outbound and inbound messages. Do the inbound messages belong to the user who authenticated (owner of the access token) the app?

1 |3000

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

Bijay Lama avatar image
Bijay Lama answered Phong Vu commented

@Phong Vu, I am actually using Ringcentral SMS API to fetch all the SMS.

1673988650524.png


1673988650524.png (96.5 KiB)
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 ·

I guess that the accessToken you attached to the content URI does not belong to the owner of the message.

Since you have the platform object (I assume that it is the platform instance from the RingCentral JS SDK), you can attach the access token using this method

var contentUri = platform.createUrl(image.uri, {addToken: true});
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