Just to clarify, you did edit your code sample after my response. The namespace value first was a back slash\, you've only just escaped it.
But yeah, that would probably have given you a invalid syntax error instead of a un-authenticated message.
Are you pointing to a controller where you are adding some middleware in the constructor perhaps? Or do you have any other active middleware registered in your app that might cause this behavior?
Yeah, I only edited it because it was displayed wrong in the markdown. It has always been two slashes , I just added another one to make it visible on here. The routing is working correctly.
No, nothing in the controller (actually an Action but same thing).
Have you changed your RouteServiceProvider file? It sets the prefix of the namespace to App\Http\Controllers by default.
On that same it also sets the "api" prefix and adds middleware('api') to any API routes.
It could be a namespace conflict or your routes being re-defined.