Fax attachments download using jquery (Using JavaScipt SDK)

  • 1
  • Problem
  • Updated 4 weeks ago
I am using Java Script SDK to download fax attachment. I am calling this API to get all faxes with attachment.

API calling 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:/platform.ringcentral.com/restapi/v1.0/account/~/extension/[EXT-ID]/message-store/[ATTACHMENT-ID...{
abcd = response1;
});

I am getting response like this.
  1. ApiResponse {_externals: Externals, _request: Request, _response: Response, _text: "", _json: null, ...}
    1. _externals: Externals {PubNub: ƒ, localStorage: Storage, Promise: ƒ, fetch: ƒ, Request: ƒ, ...}
    2. _json: null
    3. _multipart: []
    4. _request: Request {originalBody: undefined, method: "GET", url: "https://platform.ringcentral.com/restapi/v1.0/acco...8/message-store/907893279008/content/907893279008...;, headers: Headers, destination: "", ...}
    5. _response: Response {type: "cors", url: "https://platform.ringcentral.com/restapi/v1.0/acco...8/message-store/907893279008/content/907893279008...;, redirected: false, status: 200, ok: true, ...}
    6. _text: ""
    7. __proto__: Object

How to download or display fax attachment from this response ? Please assist me ASAP.
Photo of AIRS INC

AIRS INC

  • 230 Points 100 badge 2x thumb
  • confused

Posted 4 weeks ago

  • 1
Photo of Phong Vu

Phong Vu, Devangelist

  • 3,252 Points 3k badge 2x thumb
Hi Airs,

You can follow the instructions from here to download fax attachment, voicemail or recorded call binary etc.

https://github.com/ringcentral/ringcentral-js#binary-downloads

Hope this helps,
Phong