Skip to main content

license

Requests the license from ONLYOFFICE Docs with information about the server and user quota.

Request example

{
"c": "license"
}

Request parameters

ParameterTypePresenceDescription
cstringrequiredThe command type.

Response example

{
"error": 0,
"license": {
"end_date": "2021-07-07T23:59:59.000Z",
"trial": false,
"customization": false,
"connections": 0,
"connections_view": 0,
"users_count": 10,
"users_view_count": 10,
"users_expire": 30
},
"server": {
"resultType": 3,
"packageType": 1,
"buildDate": "2021-05-21T00:00:00.000Z",
"buildVersion": "6.3.0",
"buildNumber": 111
},
"quota": {
"users": [
{
"userid": "uid-0",
"expire": "2021-07-07T23:59:59.000Z"
},
{
"userid": "uid-1",
"expire": "2021-07-09T23:59:59.000Z"
}
],
"users_view": [
{
"userid": "uid-0",
"expire": "2021-07-07T23:59:59.000Z"
},
{
"userid": "uid-1",
"expire": "2021-07-09T23:59:59.000Z"
}
]
}
}

Response parameters

ParameterTypePresenceDescription
errorintegerrequiredThe error code.
licenseobjectoptionalThe document license information.
license.end_datestringrequiredThe license expiration date.
license.trialbooleanrequiredWhether the license is trial.
license.customizationbooleanrequiredWhether the customization parameters marked with a note about editing in ONLYOFFICE Docs Developer are available for editing only in ONLYOFFICE Docs Developer.
license.connectionsintegeroptionalThe number of connections for the connection license.
license.connections_viewintegeroptionalThe number of connections for the live viewer.
license.users_countintegeroptionalThe number of users for the user license.
license.users_view_countintegeroptionalThe number of users for the live viewer.
license.users_expireintegeroptionalThe number of days after which the user license expires.
serverobjectrequiredThe server characteristics.
server.resultTypeintegerrequiredThe license status: 1 - an error occurred, 2 - the license expired, 3 - the license is still available, 6 - the trial license expired.
server.packageTypeintegerrequiredThe product version: 0 - an open source product, 1 - ONLYOFFICE Docs Enterprise, 2 - ONLYOFFICE Docs Developer.
server.buildDatestringrequiredThe build date.
server.buildVersionstringoptionalThe build version.
server.buildNumberintegerrequiredThe build number.
quotaobjectrequiredThe user quota value.
quota.usersobject[]requiredThe user quota for the user license.
quota.users.useridstringrequiredThe ID of the user who opened the editor.
quota.users.expirestringrequiredThe date of license expiration for this user.
quota.users_viewobject[]requiredThe user quota for the live viewer.
quota.users_view.useridstringrequiredThe ID of the user who opened the document for viewing.
quota.users_view.expirestringrequiredThe date of viewing expiration for this user.