All URIs are relative to https://sandbox.push.adpdigital.com/api
Method | HTTP request | Description |
---|---|---|
pushByQuery | POST /push/byQuery | Push a text message to a segment of devices |
pushToUsers | POST /push/toUsers | Push multiple text messages to users |
\Chabok\Client\Model\PushResponse pushByQuery($payload)
Push a text message to a segment of devices
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiSecurity, Get your 'YOUR_API_KEY' from http://sandbox.push.adpdigital.com/front/account/edit
Chabok\Client\Configuration::getDefaultConfiguration()->setApiKey('access_token', 'YOUR_API_KEY');
// Get your 'App_ID' from http://sandbox.push.adpdigital.com/front/account/edit
Chabok\Client\Configuration::getDefaultConfiguration()->setAppId('App_ID');
// Make Dev mode enable If you want to test your App on Development environment or don't have Chabok premium account
Chabok\Client\Configuration::getDefaultConfiguration()->setDevMode(true);
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Chabok\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer');
$api_instance = new Chabok\Client\Api\PushApi();
$payload = new \Chabok\Client\Model\SegmentPush(); // \Chabok\Client\Model\SegmentPush |
try {
$result = $api_instance->pushByQuery($payload);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PushApi->pushByQuery: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
payload | \Chabok\Client\Model\SegmentPush |
\Chabok\Client\Model\PushResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Chabok\Client\Model\PushResponse[] pushToUsers($messages)
Push multiple text messages to users
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiSecurity, Get your 'YOUR_API_KEY' from http://sandbox.push.adpdigital.com/front/account/edit
Chabok\Client\Configuration::getDefaultConfiguration()->setApiKey('access_token', 'YOUR_API_KEY');
// Get your 'App_ID' from http://sandbox.push.adpdigital.com/front/account/edit
Chabok\Client\Configuration::getDefaultConfiguration()->setAppId('App_ID');
// Make Dev mode enable If you want to test your App on Development environment or don't have Chabok premium account
Chabok\Client\Configuration::getDefaultConfiguration()->setDevMode(true);
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Chabok\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer');
$api_instance = new Chabok\Client\Api\PushApi();
$messages = new \Chabok\Client\Model\Push(); // \Chabok\Client\Model\Push |
try {
$result = $api_instance->pushToUsers($messages);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PushApi->pushToUsers: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
messages | \Chabok\Client\Model\Push |
\Chabok\Client\Model\PushResponse[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]