Skip to main content

license

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

Request example

{
"c": "license"
}

Parameters

NameTypePresenceDescription
cstringrequiredDefines the 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
errorintegerrequiredDefines an error code.
licenseobjectoptionalDefines the document license information.
license.end_datestringrequiredDefines the license expiration date.
license.trialbooleanrequiredDefines if the license is trial or not.
license.customizationbooleanrequiredDefines if the customization parameters marked with a note about editing in ONLYOFFICE Docs Developer are available for editing only in ONLYOFFICE Docs Developer or not.
license.connectionsintegeroptionalDefines the number of connections for the connection license.
license.connections_viewintegeroptionalDefines the number of connections for the live viewer.
license.users_countintegeroptionalDefines the number of users for the user license.
license.users_view_countintegeroptionalDefines the number of users for the live viewer.
license.users_expireintegeroptionalDefines the number of days after which the user license expires.
serverobjectrequiredDefines the server characteristics.
server.resultTypeintegerrequiredDefines the license status:

1 - an error occurred,

2 - the license expired,

3 - the license is still available,

6 - the trial license expired.
server.packageTypeintegerrequiredDefines the product version:

0 - an open source product,

1 - ONLYOFFICE Docs Enterprise,

2 - ONLYOFFICE Docs Developer.
server.buildDatestringrequiredDefines the build date.
server.buildVersionstringoptionalDefines the build version.
server.buildNumberintegerrequiredDefines the build number.
quotaobjectrequiredDefines the user quota value.
quota.usersobject[]requiredDefines the user quota for the user license where:

userid - the id of the user who opened the editor,

expire - date of license expiration for this user.
quota.users_viewobject[]requiredDefines the user quota for the live viewer where:

userid - the id of the user who opened the editor,

expire - date of viewing expiration for this user.