Documentation - Devices - List Of Devices


  1. List of Devices
  2. Fetch Single Device

# List of devices

You can use the SMS Gateway API to get a list of your devices programmatically. Devices refer to your Android phones that you currently have connected to your SMS Gateway API account.


API Reference

API Endpoint
URL: http://smsgateway.me/api/v3/devices
Method: GET
Request Parameters
Parameter Required Description Default Value
email YES Your username for the site
password YES Your password for the site
page NO The page number (500 results per page) 1
Success Response
Status Code: 200 OK
Content Type: application/json
Output format: See Example

PHP Example

The below example uses the Android SMS Gateway API PHP library which is available for download - This library requires PHP CURL to be enabled.
Please note that although this is PHP example using the SMS Gateway library you may make requests in any language using the parameters above.

  • <?php
  • include "smsGateway.php";
  • $smsGateway = new SmsGateway('demo@smsgateway.me', 'password');

  • $page = 1;

  • $result = $smsGateway->getDevices($page);
  • ?>

The result will contain a associative multidimensional array. The first item being status which is the response code returned from the SMS Gateway API. The second item being response which will be the array version of the response examples of which can be found below.


Success Example

  • {
  • "success": true,
  • "result": {
    • "total": 2,
    • "per_page": 500,
    • "current_page": 1,
    • "last_page": 1,
    • "from": 1,
    • "to": 2,
    • "data": [
      • {
        • "id": "9",
        • "name": "U5D1",
        • "make": "Samsung",
        • "model": "Galaxy S4",
        • "number": "+4435723458",
        • "provider": "Lyca",
        • "country": "Poland",
        • "connection_type": "GSM",
        • "battery": "80",
        • "signal": "16",
        • "wifi": "0",
        • "lat": "52.268157",
        • "lng": "21.049805",
        • "last_seen": 1404415159,
        • "created_at": 100661493881
      • },
      • {
        • "id": "10",
        • "name": "U5D1",
        • "make": "Samsung",
        • "model": "Galaxy S4",
        • "number": "+4435723459",
        • "provider": "3",
        • "country": "Poland",
        • "connection_type": "GSM",
        • "battery": "95",
        • "signal": "2",
        • "wifi": "0",
        • "lat": "52.52.268157",
        • "lng": "21.049805",
        • "last_seen": 1391990399,
        • "created_at": false
      • }
    • ]
  • }
  • }