Support the ongoing development of Laravel.io →
Authentication

Hello. I am trying to use Dingo's 'basic' api.auth middleware to protect my API endpoints. The user is already authenticated using Laravel's authentication when a request to the Dingo API route is made, but I receive the following error:

{"message":"Failed to authenticate because of bad credentials or an invalid authorization header.","status_code":401}

I'm not sure what additional request parameters are required for Dingo to accept the user as authenticated. The documentation is not clear on this: https://github.com/dingo/api/wiki/Authentication

Any help would be appreciated. Thank you.

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

andrewhl andrewhl Joined 12 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.