Zvini API allows programs to access, modify and delete user data by calling API methods with HTTP. The API methods can be called with either GET or POST methods. The method parameters can be passed either as a query string or as a URL-encoded form data or as a multipart form data. The base URL of all the methods is https://zvini.com/api-call/
. The response returned from the server is either a JSON document or binary data.
There are two ways to access an API method. A program requires either of the following:
1. An API key. It's a random password. Users can generate multiples of them from "Home" > "Account" > "API Keys" page. To call a method this way an api_key
parameter should be present and its value should be the generated random password.
2. An authenticated session. In this case a user should already be signed in. To call a method this way a session_auth
parameter should be present and its value should be equal to a truthy value (e.g. 1).
Click below to see a PHP example code that calls an API method.
PHP ExampleWhen accessing an API method with an API key the following errors are expected:
INVALID_API_KEY
- The API key is invalid.
API_KEY_EXPIRED
- The API key is expired.
ACCESS_DENIED
- The API key doesn't have a permission to perform the action.
USER_DISABLED
- The user account is disabled.
When accessing an API method with an authenticated session the following errors are expected:
CROSS_DOMAIN_REQUEST
- The request was referred by a different domain.
NOT_SIGNED_IN
- The user has already signed out.
USER_DISABLED
- The user account is disabled.
USER_PASSWORD_RESET
- The user password has been reset by an administrator and it needs to be changed.