Skip to main content

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.

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?


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

1673988650524.png


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});

Reply