Login screen keeps showing on POST calls


We are facing a issue with Yii Framework, we are running the advanced framework, and we made a controller for a external company to call using a webhook.

The route works fine and normal calls, and get cals works fine (we used behaviors to allow anyone to call the the route (we use IP filtering and a access token))

But the POST call never works, it keeps showing the login screen regardles of what ever behaivor or verbs we use.

Without a bit of information on controller, action and behavior it is hard to say.
The speculation goes like check if the route isn’t protected by login and you aren’t satisfying criteria for login.

I also hope you are using rest controller and not web!

Assuming your action is called webhook try adding an except clause to the access array in behaviors function:

'except' => ['webhook'],

Also try disabling csrf. E.g. below

    public function beforeAction($action)
        if ($action->id == 'webhook') {
            $this->enableCsrfValidation = false;

        return parent::beforeAction($action);

Yes i found the same fix, thanks