Skip to main content
Version: 4.2.0

ℹ️ 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'],
);
paramtyperequireddescription
fieldsList<String>noFields to request; defaults to the commonly used set

Return methods​