7 months ago

How to send an Nova authenticated HTTP request using Axios ?

Posted 7 months ago by aymanefrost


I'm building a Nova component that is basically an interface to manage game servers.

So I have some endpoints in my /nova-components/Servers/routes/api.php that give me the game servers status and some other options (start, stop...). When I'm authenticated on Nova, I can use these routes in my browser. When I'm not authenticated, I get a 403, which is expected since the routes are behind the Nova gate.

The problem is when I'm trying to send a GET request using Nova.request().get(), I get a 403.

My question is : how can I send a request using Axios that is not going to be forbidden by the Nova gate ?

Thank you for your help!

Please sign in or create an account to participate in this conversation.