cURL
curl -X GET https://api.telegent.com/v1.0/distributor/accounts \
-H 'Authorization: Bearer YOUR_TOKEN'import requests
url = "https://api.telegent.com/v1.0/distributor/accounts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.telegent.com/v1.0/distributor/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telegent.com/v1.0/distributor/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.telegent.com/v1.0/distributor/accounts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.telegent.com/v1.0/distributor/accounts")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/distributor/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"AccountId": "AID-ab12345-2725-45a1-bd5e-526ed19799xx",
"AccountName": "Telegent Account",
"TotalSubscribers": 16,
"BillingAddress": {
"Street1": null,
"Street2": "NULL",
"City": null,
"State": null,
"Zip": null,
"Country": null
},
"MailingAddress": {
"Street1": null,
"Street2": null,
"City": null,
"State": null,
"Zip": null,
"Country": null
}
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Distributors
Get Accounts
Retrieve a list of all accounts associated with the distributor. Returns account information including name, total subscribers, and address details.
What this does: Returns a list of all accounts under this distributor including their AID- IDs, names, and status. Use this to enumerate accounts before making account-specific calls.
Next steps:
- Get account details —
GET /v1.0/account - Create an account —
POST /v1.0/account/create
GET
/
v1.0
/
distributor
/
accounts
cURL
curl -X GET https://api.telegent.com/v1.0/distributor/accounts \
-H 'Authorization: Bearer YOUR_TOKEN'import requests
url = "https://api.telegent.com/v1.0/distributor/accounts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.telegent.com/v1.0/distributor/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telegent.com/v1.0/distributor/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.telegent.com/v1.0/distributor/accounts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.telegent.com/v1.0/distributor/accounts")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/distributor/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"AccountId": "AID-ab12345-2725-45a1-bd5e-526ed19799xx",
"AccountName": "Telegent Account",
"TotalSubscribers": 16,
"BillingAddress": {
"Street1": null,
"Street2": "NULL",
"City": null,
"State": null,
"Zip": null,
"Country": null
},
"MailingAddress": {
"Street1": null,
"Street2": null,
"City": null,
"State": null,
"Zip": null,
"Country": null
}
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Response
Accounts Retrieved
The response is of type object.
⌘I