All URIs are relative to https://one-api.bsg.world, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| rcsSend() | POST /api/campaigns/rcs/send | Send RCS message |
| rcsSendGroups() | POST /api/campaigns/rcs/send-groups | Send RCS message to contact list |
rcsSend($send_rcs_campaign): \BSG\Api\V2\Model\RcsSend200ResponseSend RCS message
This method provides the ability to send a single rcs message or to send a mass rcs message. It also supports sending messages via an alternative SMS channel if the rcs can’t be delivered
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: ExternalAuth
$config = BSG\Api\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new BSG\Api\V2\Api\CampaignRCSApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$send_rcs_campaign = new \BSG\Api\V2\Model\SendRcsCampaign([
'phones' => [
0 => [
'number' => '380661231231',
],
],
'sender' => 'rcs_sender',
'options' => [
'text' => 'Hello! ☺️',
],
]);
try {
$result = $apiInstance->rcsSend($send_rcs_campaign);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CampaignRCSApi->rcsSend: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| send_rcs_campaign | \BSG\Api\V2\Model\SendRcsCampaign |
\BSG\Api\V2\Model\RcsSend200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
rcsSendGroups($send_rcs_campaign_groups): \BSG\Api\V2\Model\RcsSendGroups200ResponseSend RCS message to contact list
The method provides the ability to send rcs messages to a group of contacts (the group ID is created in the client’s contact book). The ability to send messages via an alternative SMS channel is also supported
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: ExternalAuth
$config = BSG\Api\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new BSG\Api\V2\Api\CampaignRCSApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$send_rcs_campaign_groups = new \BSG\Api\V2\Model\SendRcsCampaignGroups([
'groups' => [
0 => 1864275,
],
'sender' => 'rcs_sender',
'options' => [
'text' => 'Hello! ☺️',
],
]);
try {
$result = $apiInstance->rcsSendGroups($send_rcs_campaign_groups);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CampaignRCSApi->rcsSendGroups: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| send_rcs_campaign_groups | \BSG\Api\V2\Model\SendRcsCampaignGroups |
\BSG\Api\V2\Model\RcsSendGroups200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]