+(923) 111 88 4444
TecniForge, 79/5-L, Sahiwal 57000

Account – Get Subscription Package

  • Home
  • Docs
  • Account – Get Subscription Package

Account – Get Subscription Package

Get Subscription Package. Requires “get_subscription” API permission.GET https://androidapi.net/api/get/subscription

Parameter #

FieldTypeDescription
secretStringThe API secret you copied from (Tools -> API Keys) page

Success Response Format #

FieldTypeDescription
statusNumberList of Codes
200 = Success
messageStringResponse message
dataArrayArray of data

Error Response Format #

NameTypeDescription
statusNumberList of Codes
400 = Invalid parameters
401 = Invalid API secret
403 = Access denied
500 = Something went wrong
messageStringResponse message
dataArrayArray of data

PHP Sample #

<?php

  $apiSecret = "API_SECRET"; // your API secret from (Tools -> API Keys) page

  $cURL = curl_init();
  curl_setopt($cURL, CURLOPT_URL, "https://androidapi.net/api/get/subscription?secret={$apiSecret}");
  curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($cURL);
  curl_close($cURL);

  $result = json_decode($response, true);

  // do something with response
  print_r($result);

Python Sample #

import requests

# your API secret from (Tools -> API Keys) page
apiSecret = "API_SECRET"

r = requests.get(url = "https://androidapi.net/api/get/subscription", params = {
    "secret": apiSecret
})
  
# do something with response object
result = r.json()

Successful Response #

{
  "status": 200,
  "message": "Subscription Package",
  "data": "data": {
   "name": "Starter",
   "usage": {
           "sms_send": {
               "used": 262,
               "limit": 1000
           },
           "sms_receive": {
               "used": 139,
               "limit": 250
           },
           "ussd": {
               "used": 16,
               "limit": 0
           },
           "notifications": {
               "used": 55,
               "limit": 0
           },
           "contacts": {
               "used": 7,
               "limit": 50
           },
           "devices": {
               "used": 3,
               "limit": 3
           },
           "apikeys": {
               "used": 4,
               "limit": 5
           },
           "webhooks": {
               "used": 1,
               "limit": 5
           },
           "actions": {
               "used": 3,
               "limit": 0
           },
           "scheduled": {
               "used": 0,
               "limit": 0
           },
           "wa_send": {
               "used": 3,
               "limit": 0
           },
           "wa_receive": {
               "used": 19,
               "limit": 0
           },
           "wa_accounts": {
               "used": 1,
               "limit": 0
           }
       }
   }
}

Error Response #

{
  "status": 400,
  "message": "Invalid Parameters!",
  "data": false
}

Leave A Comment