List WhatsApp phone numbers
curl --request GET \
--url https://api.greentick.ai/v1/phone-numbers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.greentick.ai/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.greentick.ai/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.greentick.ai/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.greentick.ai/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.greentick.ai/v1/phone-numbers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.greentick.ai/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{
"success": true,
"data": [
{
"ref": "<string>",
"id": "<string>",
"display_phone_number": "+1 555-123-4567",
"verified_name": "GreenTick",
"quality_rating": "GREEN",
"throughput": {
"level": "<string>"
},
"code_verification_status": "VERIFIED",
"status": "CONNECTED",
"new_name_status": "NONE",
"is_on_biz_app": true,
"history_sync": {
"status": "pending",
"progress": 123,
"phase": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
}
],
"total": 123
}{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}Phone numbers
List WhatsApp phone numbers
Lists the connected WhatsApp phone number with Meta profile fields stored by GreenTick. Filter with ref or id query params to narrow to one line.
GET
/
phone-numbers
List WhatsApp phone numbers
curl --request GET \
--url https://api.greentick.ai/v1/phone-numbers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.greentick.ai/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.greentick.ai/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.greentick.ai/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.greentick.ai/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.greentick.ai/v1/phone-numbers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.greentick.ai/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{
"success": true,
"data": [
{
"ref": "<string>",
"id": "<string>",
"display_phone_number": "+1 555-123-4567",
"verified_name": "GreenTick",
"quality_rating": "GREEN",
"throughput": {
"level": "<string>"
},
"code_verification_status": "VERIFIED",
"status": "CONNECTED",
"new_name_status": "NONE",
"is_on_biz_app": true,
"history_sync": {
"status": "pending",
"progress": 123,
"phase": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
}
],
"total": 123
}{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}
