HTTP / JSON protocol
In the common cases ( e.g. web and mobile application development ) the most used method to access remote services, the used interface is HTTP/HTTPS. Such service is pCloud API.
Method name is passed as request path (for example you should request /list
to call list
Parameters are passed by either GET, POST or using a cookie (and are set in this order, so that cookie with some name will overwrite the same GET parameter).
Response is normally JSON array with multiple fields. The key result
is always present.
Successful response result:0
Successful response example:
A non-zero result
means an error.
is set to the error key and error
is an error message. After every method definition we list the possible error codes that could be returned. When there is an error HTTP header X-Error: xxxx
is sent with the error code.
Error response example:
result: "error code",
error: "error message"