PHP code example of saber13812002 / gap-sdp-api

1. Go to this page and download the library: Download saber13812002/gap-sdp-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

saber13812002 / gap-sdp-api example snippets


Route::post('/webhook-bot-get-id', [BotMotherController::class, 'getIdMother']);

https://yourdomain.com/api/webhook-bot-get-id?token=aaaaaaaaaaaaaaa1111111111111

use Gap\SDP\Api as GapBot;

$bot = new GapBot($request->input('token'), $request);

$bot->ChatID()
$bot->Text()
$bot->Token()
$bot->Type()

        $chat_id = $messenger->ChatID();

        $content = [
            'chat_id' => $chat_id,
            'text' => $message
        ];

        $messenger->sendMessage($content);