List phone numbers connected to this workspace
curl --request GET \
--url https://api.algosmiths.com/api/v1/phone-numbers/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.algosmiths.com/api/v1/phone-numbers/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.algosmiths.com/api/v1/phone-numbers/', 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.algosmiths.com/api/v1/phone-numbers/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.algosmiths.com/api/v1/phone-numbers/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.algosmiths.com/api/v1/phone-numbers/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.algosmiths.com/api/v1/phone-numbers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"phone_number_id": "<string>",
"display_phone_number": "<string>",
"verified_name": "<string>",
"quality_rating": "<string>",
"whatsapp_business_account_id": "<string>",
"messaging_limit_tier": "<string>",
"business_username": "<string>",
"business_username_status": "<string>"
}
]{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Account Health
List phone numbers connected to this workspace
Local rows synced from Meta, not a live Graph API call. Use phone_number_id / whatsapp_business_account_id from here as the phone_number / whatsapp_business_account_id values on POST /messages/.
GET
/
api
/
v1
/
phone-numbers
/
List phone numbers connected to this workspace
curl --request GET \
--url https://api.algosmiths.com/api/v1/phone-numbers/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.algosmiths.com/api/v1/phone-numbers/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.algosmiths.com/api/v1/phone-numbers/', 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.algosmiths.com/api/v1/phone-numbers/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.algosmiths.com/api/v1/phone-numbers/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.algosmiths.com/api/v1/phone-numbers/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.algosmiths.com/api/v1/phone-numbers/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"phone_number_id": "<string>",
"display_phone_number": "<string>",
"verified_name": "<string>",
"quality_rating": "<string>",
"whatsapp_business_account_id": "<string>",
"messaging_limit_tier": "<string>",
"business_username": "<string>",
"business_username_status": "<string>"
}
]{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
ApiKeyAuthtokenAuthCookieAuth
Workspace API key, e.g. Authorization: Bearer cb_live_.... Create one in Settings → API Keys. See public_api.md § 3 for scopes.
Response
Maximum string length:
255Maximum string length:
25Maximum string length:
255Maximum string length:
60Maximum string length:
64Maximum string length:
128Maximum string length:
64
