Use Laravel Passport that provides by Laravel itself.
https://laravel.com/docs/5.8/passport
BTW, API authentication doesn't work the same way you are thinking. It's not a good idea to pass username and password to url for authentication.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have an application in Laravel 5.7, I need authenticate the users in a other API (third party API), these API are code in REST with oAuth2. So, I want send a username and password to the URL-API and the callback is if the user are or not authorized to use the APP.
How I can make this?
Please or to participate in this conversation.