Majid-Kamali's avatar

Majid-Kamali wrote a reply+100 XP

3w ago

Reverb: Error joining private channel

You should check your route list. You defined a prefix for the route in BroadcastServiceProvider

‍‍‍public function boot(): void {
    Broadcast::routes([
        'prefix' => 'api/v1',
        'middleware' => ['api', 'auth:sanctum'],
    ]);
    require base_path('routes/channels.php');
} 

Check your route with:

php artisan route:list | grep "broadcast"

I think your broadcast auth endpoint becomes: /api/v1/broadcasting/auth

And fix you Route in Echo Auth Endpoint

window.Echo = new Echo({
    authEndpoint: '/api/v1/broadcasting/auth',
    withCredentials: true,
   
});