跳到主要内容

许可证

向 ONLYOFFICE 文档请求许可证,并获取有关服务器和用户配额的信息。

请求示例

{
"c": "license"
}

请求参数

参数类型是否必填描述
cstring必填命令类型。

响应示例

{
"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"
}
]
}
}

响应参数

参数类型是否必填描述
errorinteger必填错误码。
licenseobject非必填文档的许可证信息。
license.end_datestring必填许可证的过期日期。
license.trialboolean必填许可证是否为试用版本。
license.customizationboolean必填那些在 ONLYOFFICE 文档开发者版中标注为可编辑的自定义参数是否仅在 ONLYOFFICE 文档开发者版中可编辑。
license.connectionsinteger非必填连接数许可证中的连接数。
license.connections_viewinteger非必填实时查看器的连接数。
license.users_countinteger非必填用户许可证中的用户数。
license.users_view_countinteger非必填实时查看器的用户数。
license.users_expireinteger非必填用户许可证在多少天后过期。
serverobject必填服务器的相关信息。
server.resultTypeinteger必填许可证状态:1 - 出现错误,2 - 许可证已过期,3 - 许可证仍有效,6 - 试用许可证已过期。
server.packageTypeinteger必填产品版本:0 - 开源产品,1 - ONLYOFFICE 文档企业版,2 - ONLYOFFICE 文档开发者版。
server.buildDatestring必填构建日期。
server.buildVersionstring非必填构建版本。
server.buildNumberinteger必填构建编号。
quotaobject必填用户配额值。
quota.usersobject[]必填用户许可证的用户配额。
quota.users.useridstring必填打开编辑器的用户 ID。
quota.users.expirestring必填该用户的许可证过期日期。
quota.users_viewobject[]必填实时查看器的用户配额。
quota.users_view.useridstring必填打开文档进行查看的用户 ID。
quota.users_view.expirestring必填该用户的查看权限过期日期。