Get phone number business profile
GET
/
whatsapp
/
phone_numbers
/
{phone_number}
/
profile
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const profile = await client.whatsapp.phoneNumbers.profile.retrieve('phone_number');
console.log(profile.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
profile = client.whatsapp.phone_numbers.profile.retrieve(
"phone_number",
)
print(profile.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
profile, err := client.Whatsapp.PhoneNumbers.Profile.Get(context.TODO(), "phone_number")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", profile.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.whatsapp.phonenumbers.profile.ProfileRetrieveParams;
import com.telnyx.sdk.models.whatsapp.phonenumbers.profile.ProfileRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ProfileRetrieveResponse profile = client.whatsapp().phoneNumbers().profile().retrieve("phone_number");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
profile = telnyx.whatsapp.phone_numbers.profile.retrieve("phone_number")
puts(profile)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$profile = $client->whatsapp->phoneNumbers->profile->retrieve('phone_number');
var_dump($profile);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx whatsapp:phone-numbers:profile retrieve \
--api-key 'My API Key' \
--phone-number phone_numbercurl --request GET \
--url https://api.telnyx.com/v2/whatsapp/phone_numbers/{phone_number}/profile \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "<string>",
"record_type": "whatsapp_phone_number_profiles",
"phone_number_id": "<string>",
"display_name": "<string>",
"profile_photo_url": "<string>",
"category": "<string>",
"about": "<string>",
"description": "<string>",
"email": "<string>",
"website": "<string>",
"address": "<string>",
"profile_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Was this page helpful?
Enable or disable Whatsapp calling for a phone number
Previous
Update phone number business profile
Next
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const profile = await client.whatsapp.phoneNumbers.profile.retrieve('phone_number');
console.log(profile.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
profile = client.whatsapp.phone_numbers.profile.retrieve(
"phone_number",
)
print(profile.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
profile, err := client.Whatsapp.PhoneNumbers.Profile.Get(context.TODO(), "phone_number")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", profile.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.whatsapp.phonenumbers.profile.ProfileRetrieveParams;
import com.telnyx.sdk.models.whatsapp.phonenumbers.profile.ProfileRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ProfileRetrieveResponse profile = client.whatsapp().phoneNumbers().profile().retrieve("phone_number");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
profile = telnyx.whatsapp.phone_numbers.profile.retrieve("phone_number")
puts(profile)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$profile = $client->whatsapp->phoneNumbers->profile->retrieve('phone_number');
var_dump($profile);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx whatsapp:phone-numbers:profile retrieve \
--api-key 'My API Key' \
--phone-number phone_numbercurl --request GET \
--url https://api.telnyx.com/v2/whatsapp/phone_numbers/{phone_number}/profile \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "<string>",
"record_type": "whatsapp_phone_number_profiles",
"phone_number_id": "<string>",
"display_name": "<string>",
"profile_photo_url": "<string>",
"category": "<string>",
"about": "<string>",
"description": "<string>",
"email": "<string>",
"website": "<string>",
"address": "<string>",
"profile_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}