Get the WhatsApp account
curl --request GET \
--url https://lazyapp.in/v1/connections/{connection}/account \
--header 'Authorization: Bearer <token>'import requests
url = "https://lazyapp.in/v1/connections/{connection}/account"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://lazyapp.in/v1/connections/{connection}/account', 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://lazyapp.in/v1/connections/{connection}/account",
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://lazyapp.in/v1/connections/{connection}/account"
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://lazyapp.in/v1/connections/{connection}/account")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lazyapp.in/v1/connections/{connection}/account")
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{
"connection_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account": {
"id": "<string>",
"name": "<string>",
"timezone_id": "71",
"timezone_name": "Asia/Kolkata",
"currency": "<string>",
"country": "<string>",
"status": "<string>",
"account_review_status": "<string>",
"business_verification_status": "<string>",
"ownership_type": "<string>",
"primary_business_location": "<string>",
"message_template_namespace": "<string>"
},
"phone_numbers": [
{
"id": "<string>",
"display_phone_number": "<string>",
"verified_name": "<string>",
"quality_rating": "<string>",
"code_verification_status": "<string>",
"name_status": "<string>",
"platform_type": "<string>",
"status": "<string>",
"throughput_level": "<string>",
"connected": true
}
]
}{
"message": "<string>",
"code": "<string>"
}{
"message": "The API is on the Pro plan. Upgrade in Billing to use live keys. Test keys keep working.",
"code": "plan_limit_reached"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>"
}{
"code": "meta_rejected",
"message": "This number was registered or deregistered too many times. Meta blocks further attempts for 72 hours.",
"meta": {
"code": 133016,
"message": "<string>",
"fbtrace_id": "<string>"
}
}Connections
Get the WhatsApp account
The WhatsApp Business Account behind the number, and every number on it (connected says whether it is already in this workspace).
Required scope: messages:read
GET
/
v1
/
connections
/
{connection}
/
account
Get the WhatsApp account
curl --request GET \
--url https://lazyapp.in/v1/connections/{connection}/account \
--header 'Authorization: Bearer <token>'import requests
url = "https://lazyapp.in/v1/connections/{connection}/account"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://lazyapp.in/v1/connections/{connection}/account', 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://lazyapp.in/v1/connections/{connection}/account",
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://lazyapp.in/v1/connections/{connection}/account"
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://lazyapp.in/v1/connections/{connection}/account")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lazyapp.in/v1/connections/{connection}/account")
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{
"connection_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account": {
"id": "<string>",
"name": "<string>",
"timezone_id": "71",
"timezone_name": "Asia/Kolkata",
"currency": "<string>",
"country": "<string>",
"status": "<string>",
"account_review_status": "<string>",
"business_verification_status": "<string>",
"ownership_type": "<string>",
"primary_business_location": "<string>",
"message_template_namespace": "<string>"
},
"phone_numbers": [
{
"id": "<string>",
"display_phone_number": "<string>",
"verified_name": "<string>",
"quality_rating": "<string>",
"code_verification_status": "<string>",
"name_status": "<string>",
"platform_type": "<string>",
"status": "<string>",
"throughput_level": "<string>",
"connected": true
}
]
}{
"message": "<string>",
"code": "<string>"
}{
"message": "The API is on the Pro plan. Upgrade in Billing to use live keys. Test keys keep working.",
"code": "plan_limit_reached"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>"
}{
"code": "meta_rejected",
"message": "This number was registered or deregistered too many times. Meta blocks further attempts for 72 hours.",
"meta": {
"code": 133016,
"message": "<string>",
"fbtrace_id": "<string>"
}
}Authorizations
Your API key, e.g. sk_live_... or sk_test_....
Path Parameters
The connection uuid.
Query Parameters
Ask Meta again instead of using the five-minute cache.