ℹ️ Get Phone Number
Get details about the business phone number used by the client. This is the phone number ID from your WhatsApp Business Account, not a recipient.
final number = await whatsapp.getPhoneNumber();
print(number.getDisplayPhoneNumber());
print(number.getVerifiedName());
print(number.getQualityRating());
print(number.getPlatformType());
print(number.isOfficialBusinessAccount());
Limit the requested fields when needed:
final number = await whatsapp.getPhoneNumber(
fields: ['display_phone_number', 'verified_name', 'quality_rating'],
);
| param | type | required | description |
|---|---|---|---|
fields | List<String> | no | Fields to request; defaults to the commonly used set |