Skip to content

gethlslink endpoint not working properly #33

@JeanLouisMassei

Description

@JeanLouisMassei

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions