Documentation - Callbacks

  1. Creating a new callback
  2. Updating an existing callback
  3. Getting a callbacks information
  4. Searching callbacks

Callbacks - Getting a callbacks information

You can use the SMS Gateway API to get a get details on a specific callbacks
Below is some sample requests and response. For complete API documentation on getting a callbacks information please refer to the Swagger (Open API Specification) documentations here: SMS Gateway API Definition

API Request

Request Endpoint
Method: GET
Request Parameters
Name Location Required Description
Authorization header true Your API token found on the settings page
id path true The ID of the callback you are trying to fetch

Request Example

  "GET": ""

Response Examples

Response Code: 200

  "id": 1,
  "name": "HTTP Callback",
  "event": "sent",
  "device_id": 1,
  "filter_type": "contains",
  "filter": "stop",
  "method": "http",
  "action": "http://mywebsite/sms-gateway-me-hook",
  "secret": "super-secret"

Error Response

When a request can not be processed

Response Code: 40x | 500

  "status": "fail",
  "message": "Could not process request",
  "data": {
    "exception": "Error message"

SDK Examples

You can use our Swagger generated PHP SDK to help integrate with our service. If you wish to use SMS Gateway Me with a different platform you may generate your own client using the swagger file.

Installation Instructions: PHP SMS Gateway SDK
Swagger Definition: SMS Gateway API Definition

Request Example


require 'vendor/autoload.php';

use SMSGatewayMe\Client\ApiClient;
use SMSGatewayMe\Client\Configuration;
use SMSGatewayMe\Client\Api\CallbackApi;

// Configure client
$config = Configuration::getDefaultConfiguration();
$config->setApiKey('Authorization', 'your-token-here');
$apiClient = new ApiClient($config);

// Create callback client
$callbackClient = new CallbackApi($apiClient);

// Get callback
$callback = $callbackClient->getCallback(17721);

Successful Response

SMSGatewayMe\Client\Model\Callback Object
    [id:protected] => 17721
    [name:protected] => Test Callback
    [event:protected] => MESSAGE_RECEIVED
    [deviceId:protected] => 123456
    [filterType:protected] => contains
    [filter:protected] => hello
    [method:protected] => HTTP
    [action:protected] =>
    [secret:protected] => SsshhhhNotASecret