H
H
hollanditkzn2017-08-08 17:20:51
Yii
hollanditkzn, 2017-08-08 17:20:51

What is the correct url to specify setWebhook?

I get nothing in response and logs.txt does not record anything. They said that the url does not come. Then the question is, what will be the correct address for yii2 if my controller is specified frontend/controllers/TelegramController.php
This class has actions

class TelegramController extends Controller
{
    public function actionWebhook()
    {
        $content = json_decode(file_get_contents('php://input'), true);
        file_put_contents('logs.txt', $content);
...
    }
}

That is, I need to specify site_domain/frontend/web/telegram/webhook or not. If not, what is the approximate address I should specify

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-08-08
@hollanditkzn

Depends on the url manager settings in the config. What can't you check?

public function actionWebhook()
    {
           echo "да это правильный урл";
    }

and type in your url into your browser. If you see "yes, this is the correct url" - then everything is ok.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question