Hello ERPNext Community,
I am encountering a challenge while trying to send notifications through the REST API. This is what I get when trying to create a new Notification Log entry:
{
"exception": "frappe.exceptions.PermissionError",
"exc_type": "PermissionError",
"exc": "[\"Traceback (most recent call last):\\n File \\\"apps/frappe/frappe/app.py\\\", line 110, in application\\n response = frappe.api.handle(request)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\\"apps/frappe/frappe/api/__init__.py\\\", line 49, in handle\\n data = endpoint(**arguments)\\n ^^^^^^^^^^^^^^^^^^^^^\\n File \\\"apps/frappe/frappe/api/v1.py\\\", line 42, in create_doc\\n return frappe.new_doc(doctype, **data).insert()\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 279, in insert\\n self.check_permission(\\\"create\\\")\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 215, in check_permission\\n self.raise_no_permission_to(permtype)\\n File \\\"apps/frappe/frappe/model/document.py\\\", line 236, in raise_no_permission_to\\n raise frappe.PermissionError\\nfrappe.exceptions.PermissionError\\n\"]",
"_server_messages": "[\"{\\\"message\\\": \\\"\\\", \\\"title\\\": \\\"Message\\\"}\"]",
"_error_message": "Insufficient Permission for Notification Log (<strong>create</strong>)"
}
I’ve checked the Role Permission Manager, but there’s no ‘create’ option for Notification Log.
Maybe there’s a particular endpoint for creating notifications?