예제 #1
0
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @param type int account_id. The account under which the member was created
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type int phone number. The phone number of the member to be deleted
     *  Should be a 10 digit number Ex: 1234567890
     */
    $p->addParam('phone', XXXXXXXX);
    $r = $e->executeAction('message', 'member_delete', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Member Deleted Successfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #2
0
     */
    $p->addParam('campaign', 'SMS BLAST TEST53');
    /**
     * @param type string meesage. The message to be sent
     */
    $p->addParam('message', 'THIS IS A TEST SMS BLAST');
    /**
     * @param type date/string SMS BLAST Campaign Schedule Time
     * Format: YYYY-MM-DD TIMEZONE hh:mm:ss
     * Ex: 2013-12-09 EST 10:25:00
     */
    $p->addParam('schedule', 'XXX');
    /**
     * @param type int group_id. Group to send the SMS Blast to
     */
    $p->addParam('group_id', XXX);
    $r = $e->executeAction('message', 'blast_update', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Blast Updated Successfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #3
0
     * Expected values: P, M, C or E
     */
    $p->addParam('start_timezone', 'P');
    /**
     * @param type string Keyword campaign end time
     */
    $p->addParam('end', '2015-09-05 21:09:59');
    /**
     * @param type string Keyword campaign end timezone
     * Expected values: P, M, C or E
     */
    $p->addParam('end_timezone', 'P');
    /**
     * @param type string The URL that the API will deliver the message to that is sent to the keyword being registered
     */
    $p->addParam('callbackurl', 'example.com');
    $r = $e->executeAction('message', 'keyword_create', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Keyword Created Successfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     *  @param type int account_id. The Account_id for which the no. of clients is requested
     */
    $p->addParam('account_id', XXXX);
    /**
     *  @param type string/date format start_date Y-M-D.
     */
    $p->addParam('start_date', "2013-06-01");
    /**
     *  @param type string/date format end_date Y-M-D.
     */
    $p->addParam('end_date', "2013-09-01");
    $r = $e->executeAction('billing', 'get_total_clients', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "Total no. of clients";
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #5
0
     * A ten digit mobile number.
     */
    $p->addParam('mobile', 5624004910);
    /**
     * @param type string shortcode
     * 
     * A valid shortcode on your account.
     */
    $p->addParam('shortcode', '63975');
    /**
     * @param type string shortcode
     * 
     * Message string. Must be 160 characters.
     */
    $p->addParam('message', 'this is test message from POC');
    $r = $e->executeAction('message', 'send', $p);
    print_r($r);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Message Sent';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     *  @param type int account_id. The Account for which the total message usage is requested
     */
    $p->addParam('account_id', XXXX);
    /**
     *	@param type string/date format start_date YYYY-MM-DD.
     */
    $p->addParam('start_date', "2013-01-01");
    /**
     *  @param type string/date format end_date YYYY-MM-DD.
     */
    $p->addParam('end_date', "2013-09-01");
    $r = $e->executeAction('billing', 'get_total_message_usage', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "Total message usage";
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #7
0
     * @param type int permission_group_id. The permission group of the user to be created for the current account
     * permission_group_id : group_name 
     *	1	:  Father
     *	2	:  Admin	
     *  4	:  Customer Support
     */
    $p->addParam('permission_group_id', 1);
    /**
     * @param type int user_status. The status of the user account
     * user_status_id : user_status
     *	1: Active
     *  2: Suspended
     *  3: Deleted
     */
    $p->addParam('user_status', 1);
    /**
     * @param type string website. The website for the user
     *  Must be a valid domain name.
     */
    $p->addParam('website', 'example.com');
    $r = $e->executeAction('user', 'update', $p);
    if ($r->isSuccessful()) {
        echo '<br>';
        echo 'User Updated Susccessfully';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
 * This functionality requires the following parameters. 
 * ## These are not optional ##
 * 
 * Account_id (type int)
 * 
 */
require_once '../eMobilePlatform.php';
use eMobilePlatform_SDK as eMobile;
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     *  @param type int account_id. The Account_id to check the no. of allotted clients
     */
    $p->addParam('account_id', XXXX);
    $r = $e->executeAction('billing', 'get_num_allotted_clients', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'The number of clients allotted for this account: ';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #9
0
     *  May contain a single shortcode, or an array of shortcodes.
     */
    $p->addParam('shortcodes', array('72727'));
    /**
     * @param type int account_permission_group_id. The permissions for the account
     */
    $p->addParam('account_permission_group_id', XXXX);
    /**
     * @todo Remove any parameters below that you are not using 
     *
     * All parameters below are optional
     * If you do not want to pass any of these parameters to the API simply remove those addParam statements
     */
    /**
     * @param type string address_line2. The address line 2 for the mailing address for the account
     */
    $p->addParam('address_line2', 'APT 1001');
    /**
     * @param type string/int fax. The fax number for the account
     */
    $p->addParam('fax', '5555555555');
    $r = $e->executeAction('account', 'update', $p);
    if ($r->isSuccessful()) {
        echo 'Account Updated Susccessfully';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #10
0
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @todo Remove any parameters below that you are not using 
     *
     * All parameters below are optional
     * If you do not want to pass any of these parameters to the API simply remove those addParam statements
     */
    /**
     * @param type int account_id. The account for which the blast list is requested
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    $r = $e->executeAction('message', 'blast_list', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Blast Campaign List Obtained Succesfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #11
0
     *  May contain a single shortcode, or an array of shortcodes.
     */
    $p->addParam('shortcodes', array('72727'));
    /**
     * @todo Remove any parameters below that you are not using 
     *
     * All parameters below are optional
     * If you do not want to pass any of these parameters to the API simply remove those addParam statements
     */
    /**
     * @param type int fax. The fax number for the account
     */
    $p->addParam('fax', 5555555555);
    /**
     * @param type string address_line2. The address line 2 for the mailing address for the account
     */
    $p->addParam('address_line2', 'APT 101');
    $r = $e->executeAction('account', 'create', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'Account Created Susccessfully';
        echo "<pre>";
        print_r($data);
        echo "</pre>";
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #12
0
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @todo Remove any parameters below that you are not using 
     *
     * All parameters below are optional
     * If you do not want to pass any of these parameters to the API simply remove those addParam statements
     */
    /**
     * @param type int account_id. The account_id for which group list is requested
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    $r = $e->executeAction('message', 'group_list', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Group List Obtained Succesfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     *  @param type int account_id. The Account_id to check charges for
     */
    $p->addParam('account_id', XXX);
    /**
     * @param type int MM. The month for which the quota overages should be calculated
     */
    $p->addParam('month', '06');
    /**
     * @param type int YYYY. The year for which the quota overages should be calculated
     */
    $p->addParam('year', '2013');
    $r = $e->executeAction('billing', 'get_quotas_overages', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'Overages: ';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #14
0
 * This API works by sending and receiving both well-formed and valid
 * XML documents. See the documentation for more information.
 */
/*
 * This file demonstrates how to delete an account through the API
 * This functionality requires the following parameters. 
 * ## These are not optional ##
 * 
 *  Account_id (type int)
 */
require_once '../eMobilePlatform.php';
use eMobilePlatform_SDK as eMobile;
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @param type int account_id The id of the account to be deleted
     */
    $p->addParam('account_id', XXXX);
    $r = $e->executeAction('account', 'delete', $p);
    if ($r->isSuccessful()) {
        echo 'Account Deleted Successfully';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     *  @param type int account_id. The Account for which the total no. of active mobile sites is being requested 
     */
    $p->addParam('account_id', XXXX);
    /**
     *  @param type string/date format start_date YYYY-MM-DD
     */
    $p->addParam('start_date', "2013-06-01");
    /**
     *  @param type string/date format end_date YYYY-MM-DD
     */
    $p->addParam('end_date', "2013-09-01");
    $r = $e->executeAction('billing', 'get_total_mobile_sites', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "Total mobile sites";
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @param type int account_id. The Account_id  to check charges for
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type string/date format start_date YYYY-MM-DD. The date from which the charges must be calculated
     */
    $p->addParam('start_date', "2013-06-01");
    /**
     * @param type string/date format end_date YYYY-MM-DD. The date till which the charges must be calculated
     */
    $p->addParam('end_date', "2013-09-01");
    $r = $e->executeAction('billing', 'calculate_total_charge', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'Total charges: ';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #17
0
require_once '../eMobilePlatform.php';
use eMobilePlatform_SDK as eMobile;
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @todo Remove any parameters below that you are not using 
     *
     * All parameters below are optional
     * If you do not want to pass any of these parameters to the API simply remove those addParam statements
     */
    /**
     *  @param type int account_id. The account for which the keyword campaign list has to be obtained
     */
    $p->addParam('account_id', XXXX);
    $r = $e->executeAction('message', 'keyword_list', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'Keywords Information: ';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
$p = new eMobile\Param();
try {
    /**
     *  @param type string keyword. The keyword to check availability
     */
    $p->addParam('keyword', 'create5');
    /**
     * @todo Remove any parameters below that you are not using 
     *
     * All parameters below are optional
     * If you do not want to pass any of these parameters to the API simply remove those addParam statements
     */
    /**
     *  @param type int account_id. The Account_id to be used to check for the keyword availability
     *   Usually the account_id where this keyword will be used
     */
    $p->addParam('account_id', XXXX);
    $r = $e->executeAction('message', 'keyword_isavailable', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'Keyword is available: ';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #19
0
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @param type int account_id. The Account_id for which the statement is required
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type string/date format start_date YYYY-MM-DD. The date from which the statement should include charges
     */
    $p->addParam('start_date', "2013-01-01");
    /**
     * @param type string/date format end_date YYYY-MM-DD. The date till which the charges must be calculated for the statement
     */
    $p->addParam('end_date', "2013-06-01");
    $r = $e->executeAction('billing', 'create_statement', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "Billing statement";
        echo '<pre>';
        var_dump($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #20
0
use eMobilePlatform_SDK as eMobile;
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @param type int account_id. The Account to which the blast campaign belongs
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type int blast_id. Id of the SMS blast campaign to be deleted
     */
    $p->addParam('blast_id', XXXX);
    $r = $e->executeAction('message', 'blast_delete', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Blast Deleted Successfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #21
0
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     *  @param type int account_id. The Account_id for which the billing informatio is required
     */
    $p->addParam('account_id', XXXX);
    /**
     *  @param type string MM. The month for which the billing info is required
     */
    $p->addParam('month', '9');
    /**
     *  @param type string YYYY. The year corresponding to the month for which the billing info is required
     */
    $p->addParam('year', '2013');
    $r = $e->executeAction('billing', 'get_billing_info', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'Billing info: ';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #22
0
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     *  @param type int account_id. The Account_id  for which the statement is required
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type string/date format start_date YYYY-MM-DD. The date from which the charges must be calculated
     */
    $p->addParam('start_date', "2013-06-01");
    /**
     * @param type string/date format end_date YYYY-MM-DD. The date till which the charges must be calculated
     */
    $p->addParam('end_date', "2013-09-01");
    $r = $e->executeAction('billing', 'report', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'Report: ';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #23
0
     * permission_group_id : group_name 
     *	1	:  Father
     *	2	:  Admin	
     *  4	:  Customer Support
     */
    $p->addParam('permission_group_id', 1);
    /**
     * @todo Remove any parameters below that you are not using 
     *
     * All parameters below are optional
     * If you do not want to pass any of these parameters to the API simply remove those addParam statements
     */
    /**
     * @param type string website. The website for the user
     *  Must be a valid domain name.
     */
    $p->addParam('website', 'example.com');
    $r = $e->executeAction('user', 'create', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'User Created Susccessfully';
        echo "<pre>";
        print_r($data);
        echo "</pre>";
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
    /**
     * @param type int account_id. The account_id under which the group is created
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type int group_id. Group to which the members belong to
     *  Use group_list.php to check the available/existing groups
     */
    $p->addParam('group_id', XXXX);
    /**
     * @param type array ph_numbers. The phone numbers() of members who want to OPT OUT.
     *  Can contain a single phone number, or an array of phone numbers.
     */
    $p->addParam('ph_numbers', array(XXXX, XXXX, XXXX));
    $r = $e->executeAction('message', 'opt_out_members_from_group', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Members Opted Out Successfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #25
0
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @param type int account_id. The account_id using which the keyword campaign was created
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type int Keyword_id of the keyword to be updated
     */
    $p->addParam('keyword_id', XXXX);
    /**
     * @param type int shortcode for Keyword campaign
     */
    $p->addParam('shortcode', 63975);
    $r = $e->executeAction('message', 'keyword_delete', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'Keyword Deleted Successfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #26
0
use eMobilePlatform_SDK as eMobile;
define('EMOBILE_USERNAME', 'blamo54');
define('EMOBILE_API_KEY', 'dt5yp0vspgdfpi8905lkns');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @param type int account_id. The Account_id to which the member belongs
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type int ph_number. The phone number of the member who wants to OPT OUT.
     */
    $p->addParam('ph_number', XXXXXX);
    $r = $e->executeAction('message', 'opt_out', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Member Opted Out Successfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #27
0
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @todo Remove any parameters below that you are not using 
     *
     * All parameters below are optional
     * If you do not want to pass any of these parameters to the API simply remove those addParam statements
     */
    /**
     * @param type int account_id. The Account_id for which the report has to be generated
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    $r = $e->executeAction('message', 'keyword_report', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Keyword Report Obtained Succesfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #28
0
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @todo Remove any parameters below that you are not using 
     *
     * All parameters below are optional
     * If you do not want to pass any of these parameters to the API simply remove those addParam statements
     */
    /**
     * @param type int account_id. The Account for which the Blast Campaign Report should be generated
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    $r = $e->executeAction('message', 'blast_report', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo "<br>";
        echo 'Blast Campaign Report Genereated Succesfully';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
 * This functionality requires the following parameters. 
 * ## These are not optional ##
 * 
 *  Account_id (type int)
 * 
 */
require_once '../eMobilePlatform.php';
use eMobilePlatform_SDK as eMobile;
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$p = new eMobile\Param();
try {
    /**
     * @param type int account_id. The Account_id to find available billing dates for
     */
    $p->addParam('account_id', XXXX);
    $r = $e->executeAction('billing', 'billing_dates_available', $p);
    if ($r->isSuccessful()) {
        $data = $r->getData();
        echo 'The available billing dates: ';
        echo '<pre>';
        print_r($data);
        echo '</pre>';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}
예제 #30
0
 * This functionality requires the following parameters. 
 * ## These are not optional ##
 * 
 * 1. Account_id (type int)
 * 2. User_id (type int)
*/
require_once '../eMobilePlatform.php';
use eMobilePlatform_SDK as eMobile;
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_API_KEY_HERE');
try {
    $e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
    $p = new eMobile\Param();
    /**
     * @param type int account_id. The account the user to be deleted belongs to
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type int user_id The id of the user to be deleted
     */
    $p->addParam('user_id', XXXX);
    $r = $e->executeAction('user', 'delete', $p);
    if ($r->isSuccessful()) {
        echo 'User Deleted Susccessfully';
    } else {
        echo $r->getMessage();
    }
} catch (\Exception $a) {
    error_log($a->getMessage());
    echo 'Exception: ' . $a->getMessage();
}