php sample code to retrieving message attachments

  • 1
  • Question
  • Updated 2 months ago
Please help me with php sample code to download attachment stream object.
Photo of Nibu Eapen

Nibu Eapen

  • 340 Points 250 badge 2x thumb

Posted 8 months ago

  • 1
Photo of Phong Vu

Phong Vu, Devangelist

  • 4,966 Points 4k badge 2x thumb
Since you are using the RingCentral PHP SDK, you can have a look at this demo code (https://github.com/ringcentral/ringcentral-php/blob/master/demo/callRecording.php), where it's shown how to read the call log and download the call recording binary file to a local folder.

For the message attachment, I guess that you get access to the message store. You can modify the demo code to read the message store, get the message attachment $URI and use theĀ $apiResponse = $platform->get($URI); to get the attachment.

+ Phong
Photo of Nikunj Bhatnagar

Nikunj Bhatnagar

  • 160 Points 100 badge 2x thumb
I am using curl to download attachment of fax. Please help me as I am not able to download it using curl
(Edited)
Photo of Phong Vu

Phong Vu, Devangelist

  • 4,496 Points 4k badge 2x thumb
Here you go.

https://github.com/PacoVu/call-ringcentral-faxapi-native-php-demo

You can check out the OAuth tutorial from here too.

+ Phong