コード例 #1
0
 * a single message that is 160 characters or less. You must include opt-out
 * information.
 */
require_once '../eMobilePlatform.php';
use eMobilePlatform_SDK as eMobile;
define('EMOBILE_USERNAME', 'AABCPOC');
define('EMOBILE_API_KEY', 'jM5iE2rCuEhNYDPp5K5D1eJbw');
$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 message has to be sent
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', 37297);
    /**
     * @param type int mobile
     * 
     * 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
     * 
コード例 #2
0
 * 4. Campaign Schedule
 * 
 */
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 to which the blast campaign should be associated with
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type string campaign. Name of the SMS Blast Campaign
     */
    $p->addParam('campaign', 'SMS BLAST TEST3');
    /**
     * @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
     */
    $p->addParam('schedule', '2013-12-09 EST 10:10:00');
    /**
     * @param type int group_id. Group to send the SMS Blast to
コード例 #3
0
 * 1. Account_id (type int)
 * 2. Start Date (type Date, Format: Y-M-D)
 * 3. End Date (type Date, Format: Y-M-D)
 * 
 */
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 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>';
コード例 #4
0
 * 7. Username (type string) Only letters, numbers, and _ are allowed
 * 8. Password (type string) Must contain upper and lower case letters with number. Must be between 8-32 digits
 * 9. Permission_Group_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_id under which a user has to be created
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type string first_name. The first name for the user account
     */
    $p->addParam('first_name', 'John');
    /**
     * @param type string last_name. The last name for the user account
     */
    $p->addParam('last_name', 'Doe');
    /**
     * @param type string email. The email address for the user
     *  Must be a unique and valid e-mail address
     */
    $p->addParam('email', '*****@*****.**');
    /**
     * @param type int mobile. The mobile phone number for the user
コード例 #5
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();
}
コード例 #6
0
 * 1. Account_id (type int)
 * 2. Month (type int, Format: MM)
 * 3. Year (type int, Format: YYYY)
 * 
 */
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 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>';
コード例 #7
0
 * 3. Phone numbers (type array)
 * 
 */
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 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';
コード例 #8
0
 * 4. Campaign End timezone (type string)
 * 5. Callbackurl (type string)
 */
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 under which the keyword campaign has to be created
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type string Keyword campaign name
     */
    $p->addParam('name', 'KEYWORD CREATE TEST');
    /**
     * @param type string Keyword to be created
     */
    $p->addParam('keyword', 'create5');
    /**
     * @param type string Reply message
     */
    $p->addParam('reply', 'TEST');
    /**
     * @param type int shortcode for Keyword campaign
     */
コード例 #9
0
 * This functionality requires the following parameters. These are not optional.
 * 
 * Keyword (type string)
 * 
 */
require_once '../eMobilePlatform.php';
use eMobilePlatform_SDK as eMobile;
define('EMOBILE_USERNAME', 'ENTER_USERNAME_HERE');
define('EMOBILE_API_KEY', 'ENTER_USERNAME_HERE');
$e = new eMobile\eMobilePlatform(EMOBILE_USERNAME, EMOBILE_API_KEY);
$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: ';
コード例 #10
0
 * 1. Account_id (Account must be of a client type) (type int)
 * 2. SMS Blast 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 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();
    }
コード例 #11
0
  i. Phone
  j. Account Permission Group ID
  k. Shortcodes
  l. Account_id
*/
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 of the account to be updated
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type string company_name
     */
    $p->addParam('company_name', 'ACME Test Company');
    /**
     * @param type string business_details. The description about the comapny
     */
    $p->addParam('business_details', 'Mobile Marketing');
    /**
     * @param type string subdomain. The subdomain for the account
     *  Must be a valid sub-domain and must be unique.
     */
    $p->addParam('subdomain', 'acme');
    /**
     * @param type string address_type
コード例 #12
0
 * XML documents. See the documentation for more information.
 */
/*
 * This file demonstrates how to create an account through the API. 
 */
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 string first_name. The first name for the account
     */
    $p->addParam('first_name', 'John');
    /**
     * @param type string last_name. The last name for the account
     */
    $p->addParam('last_name', 'Doe');
    /**
     * @param type string company_name. The company name for the account
     */
    $p->addParam('company_name', 'ACME Test Company');
    /**
     * @param type string email. The email address for the account
     *  Must be a unique and valid e-mail address
     */
    $p->addParam('email', '*****@*****.**');
    /**
     * @param type int mobile. The mobile phone number for the account
コード例 #13
0
 * 1. Account_id (Account must be of a client type) (type int)
 * 2. Phone number (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 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();
コード例 #14
0
 * 2. Account_id (type int) (Account must be of a client type)
 * 3. Shortcode (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 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>';
コード例 #15
0
ファイル: opt_out.php プロジェクト: mselango/emobileplatoform
 * 2. Phone numbers (type array)
 * 
 */
require_once '../eMobilePlatform.php';
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();
    }
コード例 #16
0
 * 4. Campaign Start time (type date string Y-m-d H:i:s)
 * 
 */
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 to which the blast campaign is associated with
     * 
     * Account has to be of client type
     */
    $p->addParam('account_id', XXX);
    /**
     * @param type int blast_id. Id of SMS Blast Campaign to be updated
     * 
     */
    $p->addParam('blast_id', XXX);
    /**
     * @param type string campaign. Name of the SMS Blast Campaign
     */
    $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
コード例 #17
0
 * 6. Mobile no.(type int)
 * 7. Phone no. (type int)
 * 8. Username (type string) Only letters, numbers, and _ are allowed
 * 
 */
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_id to which the user belongs to
     */
    $p->addParam('account_id', XXXX);
    /**
     * @param type int user_id The user_id of the user to be updated
     */
    $p->addParam('user_id', XXXX);
    /**
     * @param type string first_name. The first name for the user account
     */
    $p->addParam('first_name', 'John');
    /**
     * @param type string last_name. The last name for the user account
     */
    $p->addParam('last_name', 'Doe');
    /**
     * @param type string email. The email address for the user
     *  Must be a unique and valid e-mail address
コード例 #18
0
 * 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();
}
コード例 #19
0
 * 3. Campaign End time (type date string Y-m-d H:i:s) 
 * 4. Campaign End timezone (type string)
 * 5. Callbackurl (type string)
 */
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 the keyword campaign belongs to
     *  Account has to be of client type
     */
    $p->addParam('account_id', XXXX);
    /**
     *  @param type string Keyword campaign name
     */
    $p->addParam('name', 'KEYWORD CREATE TEST 12333');
    /**
     *  @param type int Keyword_id of the keyword to be updated
     */
    $p->addParam('keyword_id', XXXX);
    /**
     *  @param type string Reply message
     */
    $p->addParam('reply', 'TESTaa1122');
    /**
     *  @param type int shortcode for Keyword campaign
     */