Reset Password
Check your e-mail for further instructions.
Reset
This method can't be used from web applications. Referrer is restricted to pcloud.com.
Name
getfilepublink
Auth
yes
Description
Creates and return a public link to a file.
The file is identified by fileid or path.
URL
https://api.pcloud.com/getfilepublink
Required
| Parameter | Description |
| fileid | int file id of the file for public link |
| path | string path to the file for public link |
Optional
| Parameter | Description |
| expire | datetime Datetime when the link will stop working |
| maxdownloads | int Maximum number of downloads for this 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. |
| 1004 | No fileid or path provided. |
| 1013 | Date/time format not understood. |
| 2000 | Log in failed. |
| 2002 | A component of parent directory does not exist. |
| 2009 | File not found. |
| 2010 | Invalid path. |
| 2014 | Please verify your email address to preform this action. |
| 2026 | You can only share your own files or folders. Copy the file to a folder you own if you need to share it. |
| 4000 | Too many login tries from this IP address. |
| 5000 | Internal error. Try again later. |