Background: I am working on a project that uses the Rest API of OctoPrint.
What is the problem?
Verified session keys do not have permission when access control is enabled.
- Put the applications details in the Config file of OctoPrint
- Obtained a temporary-session-key
- Signed and verified the session key (Gets response code 200)
- Use this key as my X-Api-Key when using the API
5.Ensured that API is enabled in the settings
When access control is enabled and try to use the API (eg post a file to the printer at
/api/files/local) I get a 403 forbidden. Note that the User API key and the one found in the settings menu works correctly.
When access control is disabled my app session key works correctly.
What did you already try to solve it?
- with and without access control
- Using the RSA keys found in the docs
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware,
serial.log or output on terminal tab, ...)
OctoPrint 1.3.8, directly on OctoPi, running in docker, and running for development on my local machine as described in the docs. Unsure if related, but the printer is a Wanhao Duplicator i3 plus, and the OctoPrint virtual printer.