-
Notifications
You must be signed in to change notification settings - Fork 0
API
Sergey Lapin edited this page Mar 10, 2019
·
1 revision
The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. To learn how to create and set up a bot, please consult Introduction to Bots and Bot FAQ.
<?php
namespace App\Http\Controllers;
use Wekser\Laragram\BotApi;
class BotController extends Controller
{
/**
* Start a new chat with bot.
*
* @return string
*/
public function start()
{
$api = new BotApi();
$api->sendChatAction(['action' => 'typing']);
return 'Hello!';
}
}
When
chat_id
is not specified, then the current authorized user ID will be used in the request.