Textlocal Logo

API Documentation

Get Users (Advanced)

A Reseller only service Requires Advanced Reseller API This command can be used to get all the users with their account details, credit thresholds, API keys and other information created under a dual brand or white label provider account.

Resource URL

https://api.txtlocal.com/get_users/

Sample Request

<?php

$data = [
    'apiKey' => 'Your API Key',

];

// Send the POST request with cURL
$ch = curl_init('https://api.txtlocal.com/get_users/');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

// Process your response here
echo $response;
<?php

	// Account details
	$apiKey = urlencode('Your API key');

	// Prepare data for GET request
	$data = '&apikey=' . $apiKey;

	// Send the GET request with cURL
	$ch = curl_init('https://api.txtlocal.com/get_users/?' . $data);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($ch);
	curl_close($ch);

	// Process your response here
	echo $response;

Parameters

There are no additional parameters for this command
Login Parameters (Additional Information)
apiKey You can create these in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address.

Sample Response

{
  "users": [
    {
      "id": "277112",
      "loginID": "example.user1@example.com",
      "Credits": 10,
      "api_hash": "1848ca2c189562792b87939a9df6eba07e2e6a5f",
      "default_sender_name": "Jims Autos",
      "last_sent": "0000-00-00",
      "signup_date": "2015-09-18 11:40",
      "timezone": "Europe/London",
      "activated": true,
      "name": "Example User 1",
      "address": "Company, Unit 35, Business Park, Long Road",
      "postcode": "WR14 3SZ",
      "town": "Malvern",
      "county": "Worcestershire",
      "country": "United Kingdom",
      "telephone": "447123456789",
      "credit_alerts": {
        "email": "",
        "thresholds": [
          50,
          20,
          10,
          5
        ]
      },
      "api_keys": []
    },
    {
      "id": "277235",
      "loginID": "example.user0@example.com",
      "Credits": 25,
      "api_hash": "254ba9cf3039c216fc1c3e00fe6499cbac06eb34",
      "default_sender_name": "Luigis",
      "last_sent": "0000-00-00",
      "signup_date": "2015-09-18 14:49",
      "timezone": "Europe/London",
      "activated": true,
      "name": "Example User 0",
      "address": "Company, Unit 35, Business Park, Long Road",
      "postcode": "WR14 3SZ",
      "town": "Malvern",
      "county": "Worcestershire",
      "country": "United Kingdom",
      "telephone": "447987654321",
      "credit_alerts": {
        "email": "example.user0@example.com",
        "thresholds": [
          50,
          20,
          10,
          5
        ]
      },
      "api_keys": [
        {
          "api_key": "GSi8ihLplrc-L1FJ4KVQW9UTPIX0E7NC8YZA5RGMOS",
          "notes": "Example API Key",
          "ip_addresses": [
            "123.123.123.123"
          ]
        }
      ]
    }
  ],
  "status": "success"
}
<?xml version="1.0" encoding="UTF-8" ?>
<response>
    <users>
        <user>
            <id>277112</id>
            <loginID>example.user1@example.com</loginID>
            <Credits>10</Credits>
            <api_hash>1848ca2c189562792b87939a9df6eba07e2e6a5f</api_hash>
            <default_sender_name>Jims Autos</default_sender_name>
            <last_sent>0000-00-00</last_sent>
            <signup_date>2015-09-18 11:40</signup_date>
            <timezone>Europe/London</timezone>
            <activated>1</activated>
            <name>Example User 1</name>
            <address>Company, Unit 35, Business Park, Long Road</address>
            <postcode>WR14 3SZ</postcode>
            <town>Malvern</town>
            <county>Worcestershire</county>
            <country>United Kingdom</country>
            <telephone>447123456789</telephone>
            <credit_alerts>
                <email></email>
                <thresholds>
                    <threshold>50</threshold>
                    <threshold>20</threshold>
                    <threshold>10</threshold>
                    <threshold>5</threshold>
                </thresholds>
            </credit_alerts>
            <api_keys></api_keys>
        </user>
        <user>
            <id>277235</id>
            <loginID>example.user0@example.com</loginID>
            <Credits>25</Credits>
            <api_hash>254ba9cf3039c216fc1c3e00fe6499cbac06eb34</api_hash>
            <default_sender_name>Luigis</default_sender_name>
            <last_sent>0000-00-00</last_sent>
            <signup_date>2015-09-18 14:49</signup_date>
            <timezone>Europe/London</timezone>
            <activated>1</activated>
            <name>Example User 0</name>
            <address>Company, Unit 35, Business Park, Long Road</address>
            <postcode>WR14 3SZ</postcode>
            <town>Malvern</town>
            <county>Worcestershire</county>
            <country>United Kingdom</country>
            <telephone>447987654321</telephone>
            <credit_alerts>
                <email>example.user0@example.com</email>
                <thresholds>
                    <threshold>50</threshold>
                    <threshold>20</threshold>
                    <threshold>10</threshold>
                    <threshold>5</threshold>
                </thresholds>
            </credit_alerts>
            <api_keys>
                <api_key>
                    <api_key>GSi8ihLplrc-L1FJ4KVQW9UTPIX0E7NC8YZA5RGMOS</api_key>
                    <notes>Example API Key</notes>
                    <ip_addresses>
                        <ip_addresse>123.123.123.123</ip_addresse>
                    </ip_addresses>
                </api_key>
            </api_keys>
        </user>
    </users>
    <status>success</status>
</response>

Errors

Error Codes
71 No users found.
72 No reseller account found.