• General
  • My Apps
  • SDKs
  • Protocols
  • Structures
  • Methods
  • Errors
Log in Register Log out
  • General

  • My Apps

  • SDKs
    • C
    • Java
    • Javascript
    • Php
    • Swift

  • Protocols
    • HTTP JSON Protocol
      • Authentication
      • Single Connection
      • Uploading Files
    • Binary Protocol
      • Sending Binary Request
      • Sending Files
      • Receiving Binary Response
      • Receiving Files Data

  • Structures
    • Datetime
    • Event
    • File Descriptors
    • Filenames
    • Metadata
    • Share
    • Tree

  • Methods
    • Intro
      • Global Parameters
      • Authentication
    • General
      • getdigest
      • userinfo
      • supportedlanguages
      • setlanguage
      • feedback
      • currentserver
      • diff
      • getfilehistory
      • getip
    • Folder
      • createfolder
      • listfolder
      • renamefolder
      • deletefolder
      • deletefolderrecursive
    • File
      • uploadfile
      • uploadprogress
      • downloadfile
      • copyfile
      • checksumfile
      • deletefile
      • renamefile
    • Auth
      • sendverificationemail
      • verifyemail
      • changepassword
      • lostpassword
      • resetpassword
      • register
      • invite
      • userinvites
      • logout
      • listtokens
      • deletetoken
      • sendchangemail
      • changemail
      • senddeactivatemail
      • deactivateuser
    • Streaming
      • getfilelink
      • getvideolink
      • getvideolinks
      • getaudiolink
      • gethlslink
      • gettextfile
    • Archiving
      • getzip
      • getziplink
      • savezip
      • extractarchive
      • extractarchiveprogress
      • savezipprogress
    • Sharing
      • sharefolder
      • listshares
      • sharerequestinfo
      • cancelsharerequest
      • acceptshare
      • declineshare
      • removeshare
      • changeshare
    • Public Links
      • getfilepublink
      • getfolderpublink
      • gettreepublink
      • showpublink
      • getpublinkdownload
      • copypubfile
      • listpublinks
      • listplshort
      • deletepublink
      • changepublink
      • getpubthumb
      • getpubthumblink
      • getpubthumbslinks
      • savepubthumb
      • getpubzip
      • getpubziplink
      • savepubzip
      • getpubvideolinks
      • getpubaudiolink
      • getpubtextfile
      • getcollectionpublink
    • Thumbnails
      • getthumblink
      • getthumbslinks
      • getthumb
      • savethumb
    • Upload Links
      • createuploadlink
      • listuploadlinks
      • deleteuploadlink
      • changeuploadlink
      • showuploadlink
      • uploadtolink
      • uploadlinkprogress
      • copytolink
    • Revisions
      • listrevisions
      • revertrevision
    • Fileops
      • file_open
      • file_write
      • file_pwrite
      • file_read
      • file_pread
      • file_pread_ifmod
      • file_checksum
      • file_size
      • file_truncate
      • file_seek
      • file_close
      • file_lock
    • Newsletter
      • newsletter_subscribe
      • newsletter_check
      • newsletter_verifyemail
      • newsletter_unsubscribe
      • newsletter_unsibscribemail
    • Trash
      • trash_list
      • trash_restorepath
      • trash_restore
      • trash_clear
    • Collection
      • collection_list
      • collection_details
      • collection_create
      • collection_rename
      • collection_delete
      • collection_linkfiles
      • collection_unlinkfiles
      • collection_move
    • OAuth 2.0
      • authorize
      • oauth2_token
    • Transfer
      • uploadtransfer
      • uploadtransferprogress

  • Errors

gethlslink

Name

gethlslink

Auth

yes

Description

Get a m3u8 playlist for live streaming for video file

Takes fileid (or path) of a video file and provides links (in the same way getfilelink does with hosts and path) from which a m3u8 playlist for HTTP Live Streaming can be downloaded.

Optional parameters are abitrate, vbitrate, resolution and skipfilename.

These have the same meaning as in getvideolink.

The defaults are the same as for getvideolink.

URL

https://api.pcloud.com/gethlslink

Required

ParameterDescription
fileidint ID of the renamed file
pathstring Path to the renamed file
Use fileid or path

Optional

ParameterDescription
abitrateint audio bit rate in kilobits, from 16 to 320
vbitrateint video bitrate in kilobits, from 16 to 4000
resolutionstring in pixels, from 64x64 to 1280x960, WIDTHxHEIGHT
skipfilenameint include the name of the file in the generated link

Output

On success it will return array hosts with servers that have the file. The first server is the one we consider best for current download.

In path there will be a request you should send to server. You need to construct the URL yourself by concatenating http:// or https:// with one of the hosts (first one) and the path.

Example

{
    expires: "Thu, 03 Oct 2013 01:27:42 +0000",
    result: 0,
    path: "/hash/My video.m3u8",
    hosts: [
        "c11.pcloud.com",
        "c20.pcloud.com"
    ]
}

Errors

CodeDescription
1000Log in required.
1004No fileid or path provided.
2000Log in failed.
2002A component of parent directory does not exist.
2003Access denied. You do not have permissions to preform this operation.
2009File not found.
2010Invalid path.
2044Video links can only be generated for videos.
4000Too many login tries from this IP address.
5002Internal error, no servers available. Try again later.
2014 © pCloud. Terms and Conditions. Privacy Policy. Intellectual Property.
© pCloud. Terms and Conditions. Privacy Policy. Intellectual Property.
Log in to pCloud Account
Log in
Sign up
Login
Create a new account
Login
Sign up
Terms of Use
GET STARTED