Reset Password
Check your e-mail for further instructions.
Reset
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:
Parameter | Description |
fileids | comma-separated fileids |
folderids | comma-separated folderids |
folderid: | just one folderid - the contents of the folder will be dumped into the virtual folder instead of the folder itself |
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
Parameter | Description |
folderid | int folder id of the folder for public link |
path | string path to the folder for public link |
Optional
Parameter | Description |
expire | datetime Datetime when the link will stop working |
maxdownloads | int Maximum number of downloads from this folder (even for the same file). |
maxtraffic | int Maximum traffic that this link will consume (in bytes, started downloads will not be cut to fit in this limit) |
shortlink | int If set, a short link will also be generated |
linkpassword | string Sets password for the link. |
Output
On success returns
Field | Description |
linkid | int ID that can be used to delete/modify this public link |
code | string link's code that can be used to retrieve the public link contents (with showpublink/getpublinkdownload) |
Field | Description |
linkid | int ID that can be used to delete/modify this public link |
shortcode | string short code that can also be passed to showpublink/getpublinkdownload |
shortlink | string 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" }
Code | Description |
1000 | Log in required. |
1013 | Date/time format not understood. |
1017 | Invalid 'folderid' provided. |
1018 | Invalid 'fileid' provided. |
1039 | Please provide 'name'. |
2000 | Log in failed. |
2009 | File not found. |
2014 | Please verify your email address to preform this action. |
4000 | Too many login tries from this IP address. |
5000 | Internal error. Try again later. |