Don't you just add the bearer token to the request?
Get it working with Postman first?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a Laravel app that works only as API gateway (let's call it APIWAY) and I'm building an external application (let's call it APILOADER) that has to log into my APIWAY via code. I'm trying to follow the example reported in the Laravel: Up and Running guide by Matt Stauffer, but i find it quite confusing, because the only example reported for code authentication refers to Laravel to Laravel communication, and that's not what I want, since my external app (APILOADER) is not laravel based.
The only thing I managed to accomplish is a personal authentication, via auth/login route, but I need the interaction to operate only with access token.
So, let's assume I have to send an ajax call like this:
$.ajax({ type: 'post', url: URL_FOR_CONNECTING_AT_APIWAY, data: {}, success: function(response){
},
error: function(error){
}
})
1: what should be the URL_FOR_CONNECTING_AT_APIWAY, according to OAuth2? 2: what are the data I have to pass?
Thanks.
Please or to participate in this conversation.