{"record":{"id":"c60b58ad4f3d26f4","repo":"RocketChat/Rocket.Chat","slug":"error-action-not-allowed","errorCode":"error-action-not-allowed","errorMessage":"This is an enterprise feature","messagePattern":"This is an enterprise feature","errorType":"http","errorClass":"Meteor.Error","httpStatus":403,"severity":"warning","filePath":"apps/meteor/ee/server/api/chat.ts","lineNumber":52,"sourceCode":"\t},\n\trequired: ['receipts', 'success'],\n\tadditionalProperties: false,\n});\n\nAPI.v1.get(\n\t'chat.getMessageReadReceipts',\n\t{\n\t\tauthRequired: true,\n\t\tquery: isChatGetMessageReadReceiptsProps,\n\t\tresponse: {\n\t\t\t200: getMessageReadReceiptsResponseSchema,\n\t\t\t400: validateBadRequestErrorResponse,\n\t\t\t401: validateUnauthorizedErrorResponse,\n\t\t},\n\t},\n\tasync function action() {\n\t\tif (!License.hasModule('message-read-receipt')) {\n\t\t\tthrow new Meteor.Error('error-action-not-allowed', 'This is an enterprise feature');\n\t\t}\n\n\t\tconst { messageId } = this.queryParams;\n\n\t\treturn API.v1.success({\n\t\t\treceipts: await getReadReceiptsFunction(messageId, this.userId),\n\t\t});\n\t},\n);\n","sourceCodeStart":34,"sourceCodeEnd":62,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/f9d3ec372bb580fa8d036f94cf03925a478ef768/apps/meteor/ee/server/api/chat.ts#L34-L62","documentation":"Thrown by the GET chat.getMessageReadReceipts REST endpoint when the current server license does not include the 'message-read-receipt' module. Rocket.Chat gates message read-receipt visibility behind an Enterprise license; community/ Starter licenses do not expose this data. The check runs inside the handler after authentication, so a valid auth token is still required first. It surfaces to the REST client as a Meteor.Error with code error-action-not-allowed.","triggerScenarios":"Calling GET /v1/chat.getMessageReadReceipts?messageId=<id> on a server whose license lacks the message-read-receipt module (License.hasModule('message-read-receipt') returns false). Happens on self-hosted Community editions, expired Enterprise trials, or licenses that predate the module.","commonSituations":"Developers running Rocket.Chat CE expecting parity with EE APIs; Enterprise trial expired silently; license applied to wrong workspace; feature flag disabled by license tier downgrade.","solutions":["Apply a valid Enterprise license that includes the message-read-receipt module via Administration > Workspace > License (or the Cloud workspace portal).","Verify the active module with the license API / admin UI before calling this endpoint.","If Enterprise is not available, stop calling this endpoint and fall back to message status fields (e.g. unread indicators) that are not license-gated.","Check for license expiration and renew if needed."],"exampleFix":"// before: unconditional call\nconst res = await fetch('/v1/chat.getMessageReadReceipts?messageId=' + id);\n\n// after: gate on license capability client-side / surface upgrade prompt\nconst hasModule = await licenseHasModule('message-read-receipt');\nif (!hasModule) {\n  throw new Error('Read receipts require an Enterprise license with the message-read-receipt module.');\n}\nconst res = await fetch('/v1/chat.getMessageReadReceipts?messageId=' + id);","handlingStrategy":"validation","validationCode":"// Check the license module before calling the endpoint\nasync function canUseReadReceipts(): Promise<boolean> {\n  const res = await fetch('/api/v1/license.get', { headers: authHeaders() });\n  const { license } = await res.json();\n  return Array.isArray(license?.modules) && license.modules.includes('message-read-receipt');\n}\nif (!(await canUseReadReceipts())) {\n  throw new Error('message-read-receipt module not licensed');\n}","typeGuard":"function hasReadReceiptLicense(modules: unknown): modules is string[] {\n  return Array.isArray(modules) && modules.includes('message-read-receipt');\n}","tryCatchPattern":"try {\n  return await api.get('chat.getMessageReadReceipts', { messageId });\n} catch (e) {\n  if (isMeteorError(e, 'error-action-not-allowed')) {\n    return { receipts: [], reason: 'not-licensed' };\n  }\n  throw e;\n}","preventionTips":["Cache the workspace's licensed modules on app start and gate UI affordances (read-receipt icons) on it.","Treat Enterprise-only endpoints as conditional, not always-on, in the client."],"tags":["enterprise","license","rest-api","read-receipts"],"backgroundTag":null,"analyzedSha":"f9d3ec372bb580fa8d036f94cf03925a478ef768","analyzedAt":"2026-08-12T19:07:17.372Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}