Octoprint returns 403 error in Unity when attempting to connect

What is the problem?

I have 2 instances of octoprint integrated with my unity project (printer2). printer 1 works but printer2 keeps returning a 403 error. it seems to be the octoprint's issue.

What did you already try to solve it?

checked the unity code, checked the api key, tried to run octoprint with CORS

Have you tried running in safe mode?

yes

Did running in safe mode solve the problem?

no

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog... no bundle, no support, unless the reason you couldn't retrieve the bundle is your network issues

WRITE HERE
octoprint-systeminfo-20240904141408.zip (148.6 KB)

Additional information about your setup

Hardware you are trying to connect to, hardware you are trying to connect from, router, access point, used operating systems, ... as much data as possible

I'm using two raspberry pis connected by ethernet

This error code is forbidden access. If you look in your tonado.log, you will see some warnings with the 403 status code.. Looks like you maybe have a wrong api key entered somewhere.

1 Like

found the issue after searching unity and found a wrong api key, thank you!

2 Likes