Get a WhatsApp Business Phone Number's business profile data.
| Type | Description |
|---|---|
Access Tokens | |
Permissions |
GET /v24.0/{whats-app-business-phone-number-id}/whatsapp_business_profile HTTP/1.1
Host: graph.facebook.com/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/{whats-app-business-phone-number-id}/whatsapp_business_profile',
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result *//* make the API call */
FB.api(
"/{whats-app-business-phone-number-id}/whatsapp_business_profile",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{whats-app-business-phone-number-id}/whatsapp_business_profile",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{whats-app-business-phone-number-id}/whatsapp_business_profile"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];Reading from this edge will return a JSON formatted result:
{ "
data": [], "paging": {} }
datapaging| Error | Description |
|---|---|
| 131031 | Business Account locked |
| 100 | Invalid parameter |
| 80008 | There have been too many calls to this WhatsApp Business account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
| 131000 | Something went wrong |
| 104 | Incorrect signature |
| 133010 | The account is not registered |
| 190 | Invalid OAuth 2.0 Access Token |
| 200 | Permissions error |
/{whats_app_business_phone_number_id}/whatsapp_business_profile.| Type | Description |
|---|---|
Access Tokens | |
Permissions |
| Parameter | Description |
|---|---|
aboutstring | The business's About text.
Maximum 139 characters. |
addressstring | Business address. Maximum 256 characters. |
descriptionstring | Business description.
Maximum 512 characters. |
emailstring | Business email address. Must be in valid email format. Maximum 128 characters. |
messaging_productenum {WHATSAPP} | Set to Required |
profile_picture_handlestring | Profile picture media asset handle, generated via the Resumable Upload API. |
verticalenum {OTHER, AUTO, BEAUTY, APPAREL, EDU, ENTERTAIN, EVENT_PLAN, FINANCE, GROCERY, GOVT, HOTEL, HEALTH, NONPROFIT, PROF_SERVICES, RETAIL, TRAVEL, RESTAURANT, ALCOHOL, ONLINE_GAMBLING, PHYSICAL_GAMBLING, OTC_DRUGS, MATRIMONY_SERVICE} | Business category. These values map to the following strings, which are displayed in the business profile in the WhatsApp client.
|
websitesarray<URI> | URLs associated with the business, such as a website, Facebook Page, or Instagram profile. Strings must be prefixed with
|
success: bool, | Error | Description |
|---|---|
| 100 | Invalid parameter |
| 200 | Permissions error |
| 131000 | Something went wrong |
| 131009 | Parameter value is not valid |
| 131031 | Business Account locked |
| 105 | The number of parameters exceeded the maximum for this operation |