Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

aymanefrost's avatar

How to send an Nova authenticated HTTP request using Axios ?

Hello,

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!

0 likes
1 reply
ejdelmonico's avatar

Are you including the api route as a string in get()?

Nova.request().get('/nova-vendor/stripe-inspector/endpoint').then(response => {
    // ...
})

Please or to participate in this conversation.