State
Server configuration
Getting important server information: version, limits, features, etc.
Can be used for checking server availability (ping). Works without authentication.
Request
{
"actions": [
{
"stateRequest": {}
}
]
}
Response
{
"results": [
{
"stateResponse": {
"now": "1609466584000",
"apiVersion": "v3.0.1",
"maxResultsOnPage": 10,
"maxActionsInRequest": 10,
"maxFileSize": 10485760,
"minIconSize": 100,
"authMethods": [
"EMAIL_CODE_AUTH_METHOD"
],
"maxUsernameLength": 20,
"minPasswordLength": 5,
"maxPasswordLength": 100,
"maxMessageLength": 1024,
"maxAudioLengthInSeconds": 120,
"maxUploadsForMessage": 5,
"maxGroupTitleLength": 10
}
}
]
}
Emulate server errors
Request
{
"actions": [
{
"fakeErrorRequest": {}
}
]
}
Response
{
"errors": [
"INTERNAL_SERVER_ERROR"
]
}
Global badge
Number of unread notifications. Should be displayed as a badge on the application icon, on browser tab, etc.
Request
{
"token": "<token>",
"actions": [
{
"badgeRequest": {}
}
]
}
Response
{
"results": [
{
"badgeResponse": {
"globalBadges": [
{
"counter": 42,
"updatedAt": "1609466584000"
}
]
}
}
]
}