question

nibu-eapen10876 avatar image
nibu-eapen10876 asked Phong Vu answered

php sample code to retrieving message attachments

may I know how I can save it to file?

RingCentral\SDK\Http\ApiResponse Object  (      [_jsonAsArray:protected] =>       [_jsonAsObject:protected] =>       [_multiparts:protected] =>       [_response:protected] => GuzzleHttp\Psr7\Response Object          (              [reasonPhrase:GuzzleHttp\Psr7\Response:private] => OK              [statusCode:GuzzleHttp\Psr7\Response:private] => 200              [headers:GuzzleHttp\Psr7\Response:private] => Array                  (


getting started
1 |1500 characters needed characters left characters exceeded

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

1 Answer

Phong Vu avatar image
Phong Vu answered
Since you are using the RingCentral PHP SDK. Have a look at this demo code ( https://github.com/ringcentral/ringcentral-php/blob/master/demo/callRecording.php).

It is for reading the call recording and download the call recording binary. But you can use the same code to download message attachment where you provide the URI of the message attachment.

+ Phong
1 |1500 characters needed characters left characters exceeded

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

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