Business Profiles - nxtele/nxcloud-doc-en GitHub Wiki

Business Profiles

To get your business phone number's business profile. WhatsApp users can view your business profile by clicking your business's name or number in a WhatsApp message thread.

Features

The API contains 2 endpoints:

// Getting display name and display name status via API
/api/wa/getBusinessProfile

// Updating display name via API
/api/wa/updateBusinessProfile

Authentication Mechanism

Please refer to the following link for authentication rules: API Interface Call Convention

Request Parameters

header Parameters:

Parameter Name Type Required Example Description
accessKey String Yes fme2na3kdi3ki User identity identifier
ts String Yes 1655710885431 Current timestamp of the request (in milliseconds). The maximum allowed time difference is 60 seconds on the server side.
bizType String Yes 2 WhatsApp business type, fixed value "2"
action String Yes mt WhatsApp business operation, fixed value "mt"
sign String Yes 6e9506557d1f289501d333ee2c365826 API input parameter signature, signature algorithm

Getting display name and display name status via API

for a list of returnable values and their meanings.

API

  • URL:https://api2.nxcloud.com/api/wa/getBusinessProfile
  • Method:POST
  • Content-Type:application/json
  • Requires authentication: Yes

Request Body

Parameter Name Type Required Example Description
appkey String Yes Appkey of the NxCloud WhatsApp application
business_phone String Yes 86158xxxx1795 WhatsApp number , including country code. e.g., 86158xxxx1795
messaging_product String Yes whatsapp Channel for sending messages, must be "whatsapp" when sending WhatsApp messages

Example request

{
    "appkey": "xxx",
    "messaging_product": "whatsapp",
    "business_phone": "852xxx"
}

Response parameters

Parameter Name Description
about The business's About text. This text appears in the business's profile
address Address of the business. Character limit 256.
description Description of the business. Character limit 512.
email The contact email address (in valid email format) of the business. Character limit 128.
profile_picture_url the profile picture.
vertical Business category. This can be either an empty string or one of the accepted values below. These values map to the following strings, which are displayed in the business profile in the WhatsApp client.
websites The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.

Example response SUCCESS

{
    "code": 0,
    "data": {
        "data": [
            {
                "about": "Hey there! I am using WhatsApp.",
                "address": "xxx",
                "description": "xxx",
                "email": "xxx",
                "profile_picture_url": "https://pps.whatsapp.net/xxx",
                "websites": [
                    "https://www.xxx.com/"
                ],
                "vertical": "PROF_SERVICES",
                "messaging_product": "whatsapp"
            }
        ]
    },
    "message": "请求成功"
}

Updating display name via API

To update your profile

API

  • URL:https://api2.nxcloud.com/api/wa/updateBusinessProfile
  • Method:POST
  • Content-Type:application/json
  • Requires authentication: Yes

Body parameters:

Parameter Name Type Required Example Description
appkey String Yes Appkey of the NxCloud WhatsApp application
business_phone String Yes 86158xxxx1795 WhatsApp number , including country code. e.g., 86158xxxx1795
messaging_product String Yes whatsapp Channel for sending messages, must be "whatsapp" when sending WhatsApp messages
about String Yes/No The business's About text. This text appears in the business's profile, beneath its profile image, phone number, and contact buttons.
address String Yes/No Address of the business. Character limit 256.
description String Yes/No Description of the business. Character limit 512.
email String Yes/No The contact email address (in valid email format) of the business. Character limit 128.
profile_picture_handle String Yes/No 4:udid000xxx Handle of the profile picture. This handle is generated when you upload the binary file for the profile picture to Meta using the Upload file template example Get header_handle value
vertical String Yes/No Business category. This can be either an empty string or one of the accepted values below. These values map to the following strings, which are displayed in the business profile in the WhatsApp client.
websites array of strings Yes/No The URLs associated with the business. For instance, a website, Facebook Page, or Instagram. You must include the http:// or https:// portion of the URL.There is a maximum of 2 websites with a maximum of 256 characters each.

Example

Sample request:

{
    "appkey": "xxx",
    "messaging_product": "whatsapp",
    "business_phone": "xxx",
    "address": "xxx"
}

Sample response:

SUCCESS

{
    "code": 0,
    "data": {
        "success": true
    },
    "message": "请求成功"
}

vertical Supported Values

ALCOHOL = Alcoholic Beverages
APPAREL = Clothing and Apparel
AUTO = Automotive
BEAUTY = Beauty, Spa and Salon
EDU = Education
ENTERTAIN = Entertainment
EVENT_PLAN = Event Planning and Service
FINANCE = Finance and Banking
GOVT = Public Service
GROCERY = Food and Grocery
HEALTH = Medical and Health
HOTEL = Hotel and Lodging
NONPROFIT = Non-profit
ONLINE_GAMBLING = Online Gambling & Gaming
OTC_DRUGS = Over-the-Counter Drugs
OTHER = Other
PHYSICAL_GAMBLING = Non-Online Gambling & Gaming (E.g. Brick and mortar)
PROF_SERVICES = Professional Services
RESTAURANT = Restaurant
RETAIL = Shopping and Retail
TRAVEL = Travel and Transportation