Open JeanLouisMassei opened 2 months ago
Hello
Not related to php sdk it seems, but related to API itself.
$pCloudFolder = new pCloud\Sdk\Folder($pCloudApp); $content = $pCloudFolder->getContent($_GET['folderId']); $request = new pCloud\Sdk\Request($pCloudApp); foreach ($content as $item) { if (strpos($item->name, 'm3u8') !== false) { $response = $request->get("gethlslink", ['fileid' => $item->fileid]); // this produces error //$response = $request->get("getfilelink", ['fileid' => $item->fileid]); // this is ok } }
When I try to API directly from the terminal :
// works perfectly curl -X GET \ 'https://eapi.pcloud.com/getfilelink?fileid=123456&access_token=thisisascret'
// gives 1000 error (log in required, but the access token works for previous curl command) curl -X GET \ 'https://eapi.pcloud.com/gethlslink?fileid=123456&access_token=thisisascret'
According to the documentation, both endpoints should require exactly the same input parameters so I don't understand...
Just a heads up.
https://docs.pcloud.com/methods/streaming/gethlslink.html
You using eapi (Europe), in the documentation is listed as only api.pcloud.com.
Hello
Not related to php sdk it seems, but related to API itself.
$pCloudFolder = new pCloud\Sdk\Folder($pCloudApp); $content = $pCloudFolder->getContent($_GET['folderId']); $request = new pCloud\Sdk\Request($pCloudApp); foreach ($content as $item) { if (strpos($item->name, 'm3u8') !== false) { $response = $request->get("gethlslink", ['fileid' => $item->fileid]); // this produces error //$response = $request->get("getfilelink", ['fileid' => $item->fileid]); // this is ok } }
When I try to API directly from the terminal :
// works perfectly curl -X GET \ 'https://eapi.pcloud.com/getfilelink?fileid=123456&access_token=thisisascret'
// gives 1000 error (log in required, but the access token works for previous curl command) curl -X GET \ 'https://eapi.pcloud.com/gethlslink?fileid=123456&access_token=thisisascret'
According to the documentation, both endpoints should require exactly the same input parameters so I don't understand...