PHP code example of ryuamy / whatsapp-qiscus-php

1. Go to this page and download the library: Download ryuamy/whatsapp-qiscus-php 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/ */

    

ryuamy / whatsapp-qiscus-php example snippets


use Ryuamy\WAQiscus;

WAQiscus\Class::function( $appId, ... );

$bodyParameters = [
    'email' => '(Qiscus login email)',
    'password' => '(Qiscus login password)',
];

$Whatsapp = WAQiscus\Authentication::getToken( '(Application ID)', $bodyParameters );

$bodyParameters = [
    'to' => '62812345678',
    'type' => 'template',
    'template' => [
        'namespace' => '(namespace template)',
        'name' => 'template_testing',
        'language' => [
            'policy' => 'deterministic',
            'code' => 'en'
        ],
        'components' => array() //header, body, and footer template variables
    ]
];

$Whatsapp = WAQiscus\Message::template( '(Application ID)', '(Token Auth)', '(Channel ID)', $bodyParameters );

composer