Support the ongoing development of →
Authentication API Laravel
Last updated by @mora 1 year ago.

it seems that the header in echo is missing

Echo.connector.pusher.config.auth.headers['Authorization'] = 'Bearer token';

You can check below link for further details.


@skynet-technologies i dont use pusher and problem is no request is sent to the '/api/auth/custom', with header or not


The above code was an example which means, we have to pass a header with authentication(using bearer) You can check the below code and implement your code within it.

window.Echo = new Echo({
            broadcaster: '',
            host: HOST_FOR_YOUR_SERVER,
            auth: {
                headers: {
                    Authorization: 'Bearer ' + AUTH_API_TOKEN,


Broadcast::routes(['middleware' => ['auth:api']]);

For more reference, you can check the below URL


Sign in to participate in this thread!


Your banner here too?

Mora mora Joined 22 Jun 2022


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

Your logo here?

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

© 2024 - All rights reserved.