Fax attachments download using jquery
Tags: fax
Oct 21, 2018 at 11:47pm • 4 replies • 0 likes
airs-inc
Hello,
I want to download FAX attachment. I got the attachment URI (e.g. http://media.ringcentral.com/.....), but when I call that uri through JS, it give's me some long string (like "JVBERi0xLjMKJeLjz9MKMSAwIG9iaiAKPDwK....."). When I try yo decode that code, It shows me some text and a Unicode. below is the sample code.
platform.get('/account/~/extension/~/message-store?messageType=Fax&dateFrom=2017-03-16T01:00:00.000Z&direction=Inbound').then(function(response) {
var abcd = "";
$records = response.json().records;
platform.get('https://media.ringcentral.com/restapi/v1.0/account/~/extension/[EXT-ID]/message-store/[ATTACHMENT-ID...{
abcd = response1;
});
Please advice ASAP.
4 Answers
Hello ,
Thank you for quick response.
I have change as per you suggested above.
I am getting response like this.
How will I get fax attachment from this response. Please advise ASAP.
Thank you for quick response.
I have change as per you suggested above.
I am getting response like this.
- ApiResponse {_externals: Externals, _request: Request, _response: Response, _text: "", _json: null, }
- _externals: Externals {PubNub: , localStorage: Storage, Promise: , fetch: , Request: , }
- _json: null
- _multipart: []
- _request: Request {originalBody: undefined, method: "GET", url: "https://platform.ringcentral.com/restapi/v1.0/acco8/message-store/907893279008/content/907893279008...;, headers: Headers, destination: "", }
- _response: Response {type: "cors", url: "https://platform.ringcentral.com/restapi/v1.0/acco8/message-store/907893279008/content/907893279008...;, redirected: false, status: 200, ok: true, }
- _text: ""
- __proto__: Object
How will I get fax attachment from this response. Please advise ASAP.
0
Can you try to replace the "media" with platform and get the attachment? https://platform.ringcentral.com/restapi/v1.0/account/~...
+ Phong
+ Phong
0
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder