Name
acceptshare
Auth
yes
Description
Accept a share request.
The request can be either identified by sharerequestid as reported by diff or by a code that comes from email.
An optional name can be specified for the folder name, otherwise the share name will be used.
Implementations are advised to ask for the local name with name pre-filled.
Optionally the target folder to mount the share may be identified by folderid or path.
If the folder is not specified, the user's default folder for accepting shares will be used, if no such folder exists one with suitable name will be created in the user's root directory.
If the optional parameter always is set, the accepting user from now on will auto-accept requests from the sharing user to the default share folder.
URL
https://api.pcloud.com/acceptshare
Required
Parameter | Description |
sharerequestid | int The id of the share request |
code | string The code that was sent to the user's email |
Optional
Parameter | Description |
name | string Specify the folder name. Otherwise, use the share name. |
folderid | int The id of the folder where to mount the share |
path | string The filepath to the point where to mount the share |
always | int If set, the accepting user from now on will auto-accept requests from the sharing user to the default share folder. |
Example
{ "result": 0 }
Code | Description |
1000 | Log in required. |
1025 | Please provide 'sharerequestid' or 'code' to accept a share. |
2000 | Log in failed. |
2001 | Invalid file/folder name. |
2002 | A component of parent directory does not exist. |
2020 | You can't share a folder with yourself. |
2021 | Non existing share request. It might be already accepted or cancelled by the sending user. |
2022 | Wrong user to accept the share. |
2023 | You are trying to place shared folder into another shared folder. |
2024 | User already has access to this folder or subfolder of this folder. |
4000 | Too many login tries from this IP address. |
5000 | Internal error. Try again later. |