Guzzle helped, thanks yuri
Announcement
Collapse
No announcement yet.
GET attachment via api
Collapse
X
-
It's the API client that does not return raw contents.
Use our official client https://github.com/espocrm/php-espo-api-client or any other API client library like Guzzle.
Leave a comment:
-
GET attachment via api
Hey guys, please help, can't get attachment(VOIP call recording)
PHP Code:$callRecordingDetails = $this->espoAPIService->getCallDetails($call->id);
public function getCallDetails($id, $useCache=false){
return $this->apiRequest(Client::METHOD_GET, 'Call/' . $id, null, $useCache);
}
$audioFileContents = $this->espoAPIService->getAttachmentContent($callRecordingDetails->voipRecordingFileId);
public function getAttachmentContent($id){
return $this->apiRequest(Client::METHOD_GET, 'Attachment/file/' . $id);
}
// returns null, when I am doing (Attachment without /file):
public function getAttachmentContent($id){
return $this->apiRequest(Client::METHOD_GET, 'Attachment/' . $id);
}
Please help me how, do I actually get the file contents?
ThanksLast edited by yuri; 04-03-2024, 06:52 AM.Tags: None
Leave a comment: