PHP code example of sentdm / whats-app-business-management-api

1. Go to this page and download the library: Download sentdm/whats-app-business-management-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/ */

    

sentdm / whats-app-business-management-api example snippets


$client = WhatsAppBusinessManagementAPIClientBuilder::init()
    ->bearerCredentials(
        BearerCredentialsBuilder::init(
            'AccessToken'
        )
    )
    ->oauth2Credentials(
        Oauth2CredentialsBuilder::init(
            'OAuthClientId',
            'OAuthRedirectUri'
        )
    )
    ->environment(Environment::PRODUCTION)
    ->apiVersion('DefaultParameterValue')
    ->build();