Im trying to _Dowload a recording via PHP SDK using the next endpoint:
https://platform.devtest.ringcentral.com/restapi/v1.0/account/accountId/recording/recordingId/content
I get the next response but i dont know how to convert this into a base64 or some kind of data, that i can send to front end and download a file:
[Date] => Array ( [0] => Mon, 11 Apr 2022 05:36:38 GMT )
[Content-Type] => Array ( [0] => audio/mpeg )
[Content-Length] => Array ( [0] => 90513 )
[Connection] => Array ( [0] => keep-alive )
[RCRequestId] => Array ( [0] => 5beabc92-b959-11ec-87c5-005056bb27a8 )
[RoutingKey] => Array ( [0] => SJC12P01PAS01 )
[Accept-Ranges] => Array ( [0] => bytes [1] => bytes )
[Content-Disposition] => Array ( [0] => inline;filename=11074662005.mp3 )
[Content-Language] => Array ( [0] => en-US )
[X-Rate-Limit-Group] => Array ( [0] => heavy )
[X-Rate-Limit-Limit] => Array ( [0] => 10 )
[X-Rate-Limit-Remaining] => Array ( [0] => 9 )
[X-Rate-Limit-Window] => Array ( [0] => 60 )
)
[headerNames:GuzzleHttpPsr7Response:private] => Array ( [server] => Server [date] => Date [content-type] => Content-Type [content-length] => Content-Length [connection] => Connection [rcrequestid] => RCRequestId [routingkey] => RoutingKey [accept-ranges] => Accept-Ranges [content-disposition] => Content-Disposition [content-language] => Content-Language [x-rate-limit-group] => X-Rate-Limit-Group [x-rate-limit-limit] => X-Rate-Limit-Limit [x-rate-limit-remaining] => X-Rate-Limit-Remaining [x-rate-limit-window] => X-Rate-Limit-Window )
[protocol:GuzzleHttpPsr7Response:private] => 1.1 [stream:GuzzleHttpPsr7Response:private] => GuzzleHttpPsr7Stream Object ( [stream:GuzzleHttpPsr7Stream:private] => Resource id #72 [size:GuzzleHttpPsr7Stream:private] => [seekable:GuzzleHttpPsr7Stream:private] => 1 [readable:GuzzleHttpPsr7Stream:private] => 1 [writable:GuzzleHttpPsr7Stream:private] => 1 [uri:GuzzleHttpPsr7Stream:private] => php://temp [customMetadata:GuzzleHttpPsr7Stream:private] => Array ( )
)
)
[_request:protected] => GuzzleHttpPsr7Request Object ( [method:GuzzleHttpPsr7Request:private] => GET [requestTarget:GuzzleHttpPsr7Request:private] => [uri:GuzzleHttpPsr7Request:private] => GuzzleHttpPsr7Uri Object ( [scheme:GuzzleHttpPsr7Uri:private] => https [userInfo:GuzzleHttpPsr7Uri:private] => [host:GuzzleHttpPsr7Uri:private] => platform.devtest.ringcentral.com [port:GuzzleHttpPsr7Uri:private] => [path:GuzzleHttpPsr7Uri:private] => /restapi/v1.0/account/~/recording/11074662005/content [query:GuzzleHttpPsr7Uri:private] => [fragment:GuzzleHttpPsr7Uri:private] => [composedComponents:GuzzleHttpPsr7Uri:private] => https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/recording/11074662005/content )
[headers:GuzzleHttpPsr7Request:private] => Array ( [Host] => Array ( [0] => platform.devtest.ringcentral.com )
[content-type] => Array ( [0] => application/json )
[accept] => Array ( [0] => application/json )
[Authorization] => Array ( [0] => bearer U0pDMTJQMDFQQVMwMHxBQUI1aUNTVnJsempDeE04aXpPaC1DUXZianU4a1hfYTg0ejQtMmtZRS1ZSVM1ZmpYMlhJUFM0V1NNdkM5Y3hEUkpBS3MxdDlGZnJkMDUxSXg1NzRmZURpajBhQWh2aEh4Z0dlZ0hZVFdBUmk0Vzg2ak1ZdkJpNUpoN3FjUVcyRjRVLVhQSzFpV0J6cHM2dHNwZklLRV82dnB4b0hRaUxsdGtaR1BURFlnZUpzcllPaEc2bTJOT0xyRHg1RDJWYnZKdi1Bc2JUZHxjclQ3WlF8cDYtaHJheXdQSW5YQm9VNjNHdG80QXxBUQ )
[User-Agent] => Array ( [0] => Unnamed/0.0.0 Windows NT/6.2 PHP/7.4.16 RCPHPSDK/2.2.3 )
[RC-User-Agent] => Array ( [0] => Unnamed/0.0.0 Windows NT/6.2 PHP/7.4.16 RCPHPSDK/2.2.3 )
)
[headerNames:GuzzleHttpPsr7Request:private] => Array ( [content-type] => content-type [accept] => accept [authorization] => Authorization [user-agent] => User-Agent [rc-user-agent] => RC-User-Agent [host] => Host )
[protocol:GuzzleHttpPsr7Request:private] => 1.1 [stream:GuzzleHttpPsr7Request:private] => GuzzleHttpPsr7Stream Object ( [stream:GuzzleHttpPsr7Stream:private] => Resource id #70 [size:GuzzleHttpPsr7Stream:private] => 0 [seekable:GuzzleHttpPsr7Stream:private] => 1 [readable:GuzzleHttpPsr7Stream:private] => 1 [writable:GuzzleHttpPsr7Stream:private] => 1 [uri:GuzzleHttpPsr7Stream:private] => php://temp [customMetadata:GuzzleHttpPsr7Stream:private] => Array ( )
)
)
)