• 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
    • Filenames
    • Metadata
    • Share
    • Tree

  • Methods
    • Intro
      • Global Parameters
      • Authentication
    • General
      • getdigest
      • userinfo
      • supportedlanguages
      • setlanguage
      • feedback
      • currentserver
      • diff
      • getfilehistory
      • getip
      • getapiserver
    • Folder
      • createfolder
      • createfolderifnotexists
      • listfolder
      • renamefolder
      • deletefolder
      • deletefolderrecursive
      • copyfolder
    • File
      • uploadfile
      • uploadprogress
      • downloadfile
      • downloadfileasync
      • copyfile
      • checksumfile
      • deletefile
      • renamefile
      • stat
    • 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
    • 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

gettreepublink

Name

gettreepublink

Auth

yes

Description

Creates and returns a public link to a virtual folder that is defined by requested tree.

Tree is identified by the following parameters:

ParameterDescription
fileidscomma-separated fileids
folderidscomma-separated folderids
folderid:just one folderid - the contents of the folder will be dumped into the virtual folder instead of the folder itself
Also requires parameter name that will be the name of the virtual folder.

Same optional parameters as getfilepublink.

The created link will have similar properties to ones returned by getfolderpublink with one notable exception:

Note: Tree public links are snapshots of the requested files and folders at the time of creation and will not follow updates that will happen in the folders later.

URL

https://api.pcloud.com/gettreepublink

Required

ParameterDescription
folderidint folder id of the folder for public link
pathstring path to the folder for public link
Use path or folderid

Optional

ParameterDescription
expiredatetime Datetime when the link will stop working
maxdownloadsint Maximum number of downloads from this folder (even for the same file).
maxtrafficint Maximum traffic that this link will consume (in bytes, started downloads will not be cut to fit in this limit)
shortlinkint If set, a short link will also be generated
linkpasswordstring Sets password for the link.

Output

On success returns

FieldDescription
linkidint ID that can be used to delete/modify this public link
codestring link's code that can be used to retrieve the public link contents


(with showpublink/getpublinkdownload)

If shortlink is set when calling, additonal
FieldDescription
linkidint ID that can be used to delete/modify this public link
shortcodestring short code that can also be passed to

showpublink/getpublinkdownload
shortlinkstring a full https link to pc.cd domain with shortcode appended

Example

{
    "result": 0,
    "linkid": Link ID,
    "link": "https:\/\/my.pcloud.com\/#page=publink&code=LinkCode",
    "code": "LinkCode"
}

Errors

CodeDescription
1000Log in required.
1013Date/time format not understood.
1017Invalid 'folderid' provided.
1018Invalid 'fileid' provided.
1039Please provide 'name'.
2000Log in failed.
2009File not found.
2014Please verify your email address to preform this action.
4000Too many login tries from this IP address.
5000Internal error. Try again later.
2014 © pCloud. Terms and Conditions. Privacy Policy. Intellectual Property.
© pCloud. Terms and Conditions. Privacy Policy. Intellectual Property.
Reset Password
Check your e-mail for further instructions.
Reset