Get a WhatsApp Business Phone Number's business profile data.
GET /v21.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
": {} }
data
paging
Error | Description |
---|---|
100 | Invalid parameter |
131031 | Business Account locked |
131000 | Something went wrong |
104 | Incorrect signature |
133010 | The account is not registered |
200 | Permissions error |
190 | Invalid OAuth 2.0 Access Token |
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. |
whatsapp_business_profile
edge from the following paths: Parameter | Description |
---|---|
about string | The business's About text.
|
address string | Business address. Maximum 256 characters. |
description string | Business description. Maximum 512 characters.
|
email string | Business email address. Must be in valid email format. Maximum 128 characters. |
messaging_product enum {WHATSAPP} | Set to Required |
profile_picture_handle string | Profile picture media asset handle, generated via the Resumable Upload API. |
vertical enum {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} | Business category. These values map to the following strings, which are displayed in the business profile in the WhatsApp client.
|
websites array<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 |
131000 | Something went wrong |
131031 | Business Account locked |
131009 | Parameter value is not valid |
200 | Permissions error |