Errors handling

If a server cannot process a request, the HTTP invocation-error header will contain the error code. Besides, the response contains the details in the XML or JSON format.

Error codes:

ErrorCodeDescription
UNKNOWN1Unknown error
SERVICE2Service temporarily unavailable
METHOD3Method does not exist
REQUEST4Failed to process the request, as itis incorrect
ACTION_BLOCKED7Requested action is temporarilyblocked for the current user
FLOOD_BLOCKED8Method execution is blocked due toflood
IP_BLOCKED9Method execution is blocked by IPaddress due to suspicious activity ofthe current user or due to otherrestrictions extending on thismethod
PERMISSION_DENIED10Permission is denied. A possiblecause – the user did not authorizethe application for the execution ofthe operation.
LIMIT_REACHED11Request call limit is reached
CANCELLED12Operation is canceled by the user
NOT_MULTIPART21Non multi-part request when addingphotos
NOT_ACTIVATED22The user must activate their account
NOT_YET_INVOLVED23The user is not involved in theapplication
NOT_OWNER24The user is not the owner of theobject
NOT_ACTIVE25Notification delivery error. The useris inactive in the application.
TOTAL_LIMIT_REACHED26Notification delivery error. Notification limit is reached.
NOT_ADMIN50The user does not haveadministrative rights to execute thismethod
PARAM100Missing or incorrect parameter
PARAM_API_KEY101The application_key parameter isnot indicated or indicated incorrectly
PARAM_SESSION_EXPIRED102Session key has expired
PARAM_SESSION_KEY103Invalid session key
PARAM_SIGNATURE104Invalid signature
PARAM_RESIGNATURE105Invalid resignature
PARAM_ENTITY_ID106Invalid discussion identifier
PARAM_USER_ID110Invalid user identifier
PARAM_ALBUM_ID120Invalid album identifier
PARAM_PHOTO_ID121Invalid photo identifier
PARAM_WIDGET130Invalid widget identifier
PARAM_MESSAGE_ID140Invalid message identifier
PARAM_COMMENT_ID141Invalid comment identifier
PARAM_HAPPENING_ID150Invalid event identifier
PARAM_HAPPENING_PHOTO_ID151Invalid event photo identifier
PARAM_GROUP_ID160Invalid group identifier
PARAM_PERMISSION200Application cannot execute thisoperation. In most cases, the causeis the attempt to access theoperation without the user’sauthorization.
PARAM_APPLICATION_DISABLED210Application is disabled
PARAM_DECISION211Invalid choice identifier
PARAM_BADGE_ID212Invalid badge identifier
PARAM_PRESENT_ID213Invalid present identifier
PARAM_RELATION_TYPE214Invalid relation type identifier
NOT_FOUND300Request information is not found
EDIT_PHOTO_FILE324Error when processing a multi-partrequest
AUTH_LOGIN401Authentication failure. Invalid username/password or authenticationmarker or the user is deleted/blocked.
AUTH_LOGIN_CAPTCHA402Authentication failure. Captcha mustbe entered to verify the user.
AUTH_LOGIN_WEB_HUMAN_CHECK403Authentication failure
NOT_SESSION_METHOD451Session key is indicated, but themethod must be called outside thesession
SESSION_REQUIRED453Session key is not indicated for amethod that requires a session
CENSOR_MATCH454Text is rejected by a censor
FRIEND_RESTRICTION455Operation cannot be executed, as afriend has set a restriction on it (putit on the black list or made theiraccount private)
GROUP_RESTRICTION456Operation cannot be executed, asthe group has set a restriction on it
UNAUTHORIZED_RESTRICTION457Unauthorized access
PRIVACY_RESTRICTION458Same as FRIEND_RESTRICTION
PHOTO_SIZE_LIMIT_EXCEEDED500The size of binary content of theimage in bytes exceeds the limit
PHOTO_SIZE_TOO_SMALL501Image size in pixels is too small
PHOTO_SIZE_TOO_BIG502Image size in pixels is too big
PHOTO_INVALID_FORMAT503Image format cannot be recognized
PHOTO_IMAGE_CORRUPTED504Image format is recognized, but thecontent is corrupted
PHOTO_NO_IMAGE505No image found in the request
PHOTO_PIN_TOO_MUCH508Too many pins on the photo
IDS_BLOCKED511Antispam check error
PHOTO_ALBUM_NOT_BELONGS_TO_USER512An attempt to upload a photo tosomeone else’s album
PHOTO_ALBUM_NOT_BELONGS_TO_GROUP513An attempt to upload a photo to analbum that does not belong to theindicated group
MEDIA_TOPIC_BLOCK_LIMIT600Too many “media” parameters
MEDIA_TOPIC_TEXT_LIMIT601Text length limit is reached
MEDIA_TOPIC_POLL_QUESTION_TEXT_LIMIT602Poll question text length limit isreached
MEDIA_TOPIC_POLL_ANSWERS_LIMIT603Too many answers to the poll
MEDIA_TOPIC_POLL_ANSWER_TEXT_LIMIT604Poll answer text length limit isreached
MEDIA_TOPIC_WITH_FRIENDS_LIMIT605Limit of marked friends is reached
MEDIA_TOPIC_WITH_FRIENDS_USER_LIMIT606Limit of marked friends is reached (user-specific)
GROUP_DUPLICATE_JOIN_REQUEST610Group join request is alreadyregistered
COMMENT_NOT_FOUND700Comment is not found
INVALID_AUTHOR701An attempt to edit a comment thatdoes not belong to the user
COMMENT_NOT_ACTIVE702An attempt to edit a deletedcommentName Code Description
TIMEOUT_EXCEEDED704Editing timeout is exceeded
CHAT_NOT_FOUND705Chat is not found
MESSAGE_NOT_ACTIVE706An attempt to edit a deletedmessage
NO_SUCH_APP900Returns when trying to get openinformation for a non-existingapplication
CALLBACK_INVALID_PAYMENT1001Error is returned by the applicationserver to notify about incorrectinformation on transaction
PAYMENT_IS_REQUIRED_PAYMENT1002Payment is required to use theservice
INVALID_PAYMENT1003Invalid payment transaction
DUPLICATE_PAYMENT1004Payment requests are too frequent
NOT_ENOUGH_MONEY1005The user account does not haveenough money
VCHAT_SERVICE_DISABLED1101Video chat is disabled
TARGET_USER_UNAVAILABLE1102The user is unavailable for videochat or video message
FRIENDSHIP_REQUIRED1103The indicated user must be a friend
BATCH1200Batch call error
APP_NO_PLATFORM_ALLOWED1300Platforms for the application are notset
APP_DEVICE_NOT_ALLOWED1301The indicated device is not available
APP_DEVICE_NOT_SPECIFIED1302Device is not indicated
APP_EMPTY_SEARCH_PARAMS1400Location search error
APP_SEARCH_SCENARIO_DOES_NOT_EXIST1401Location search error
SYSTEM9999Critical system error. Notify thesupport service

Additional codes for error 100 “invalid parameter”

Returns error_data in the field, in this case the field error_field contains the name of an invalid parameter.

NameCodeDescription
NOT_NULL1Parameter must be indicated
NOT_EMPTY2Parameter must not be empty
IS_EMPTY3Parameter must be empty
MAX_ELEMENTS4Restriction on the number of elements
MIN_LENGTH5Parameter is too short
MAX_LENGTH6Parameter is too long
MIN_VALUE7Parameter value is too small
MAX_VALUE8Parameter value is too big
RANGE9Parameter value must be in the indicated range

Examples

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:error_response xmlns:ns2="http://api.forticom.com/1.0/">
     <error_code>101</error_code>
     <error_msg>PARAM_API_KEY : No application key</error_msg>
</ns2:error_response>
{
    "error_code" : 100,
    "error_msg" : "PARAM : Either session_key or uid must be specified",
    "error_data" : "1",
    "error_field" : "uid"
}