Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gethlslink endpoint not working properly #33

Open
JeanLouisMassei opened this issue Apr 14, 2024 · 1 comment
Open

gethlslink endpoint not working properly #33

JeanLouisMassei opened this issue Apr 14, 2024 · 1 comment

Comments

@JeanLouisMassei
Copy link

JeanLouisMassei commented Apr 14, 2024

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...

@SHelfinger
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants