Im trying to create a API call from my local n8n instance to my local erpnext instance. Both are the current version as of last week.
A connection to a erpnext instance on erpnext.com is able to connect with eas.
The local call to erpnext hower fails.
Can someone verify the function with a local erpnext installation?
The erpnext connector throws the following error at me:
Forbidden - perhaps check your credentials?
403 - {“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 File \"apps/frappe/frappe/api/init.py\", line 49, in handle\n data = endpoint(**arguments)\n File \"apps/frappe/frappe/api/v1.py\", line 76, in read_doc\n raise frappe.PermissionError\nfrappe.exceptions.PermissionError\n"]”,“_server_messages”:“["{\"message\": \"User Guest does not have doctype access via role permission for document Currency
User Guest does not have access to this document\", \"title\": \"Message\"}"]”}
Additional informatin:
Userrights are set identicaly on local and cloud version. Both are new instances and the api key and secret has been checkt multiple times.
Thank you for the additional questions:
version 1.37.3
Database: Docker installation i guess (default: SQLite)
OS Ubuntu Container
EXECUTIONS_PROCESS default as it is in Docker i guess
Virtualisation: Proxmox
Well, that is exactly my problem.
The token should in my opinion authenticate as the service user, in my case [email protected], but it does not do that.
The same configuration with that api connecting to company.erpnext.com works without any issues. For me it looks like a issue with the connection to a local erpnext instance.
I have seen many other comments where people are having issues while communicating with a local erpnext installation.
I wonder if someone has it running locally?
I an other forum i have seen that the path set in n8n was pointing to the wrong path a while back and as a result of that the authentication was not successful. I wonder if that problem has reappeared.
Regardless of the access given to the API user as for my understanding the api call should always be working.
for now I’m always getting the folowing error
“Couldn’t connect with these settings
FORBIDDEN”
If I use the same user to connect to the api through the browser it works without any problems. This Tells me that the access rights are correct or am I wrong?
Have you tried to use the HTTP Request node to check if the credentials works as expected?
You can open the dev console (f12) and see the exact query to the API.
@Jon can you take a look into the node, maybe there is some issues with the configuration
according erpnext the “guest” account will be used if no user has been given for the authentication. Which in my opinion does not seem to be the case. I have checkt the request with the console in IE (results below) and with postman as well.
postman gives me basicaly the same “guest” error message as n8n.
For me it seems to be a Erpnext api issue.