detectPhoneNumberStatus method

Future detectPhoneNumberStatus({
  1. required String phoneNumber,
  2. required String countryCode,
})

The status API allows businesses to detect if a number is fake or has ported to a new network.

Implementation

Future<dynamic> detectPhoneNumberStatus({
  required String phoneNumber,
  required String countryCode,
}) async {
  final response = await NetworkHelper.getRequest(
    url:
        "$url/api/insight/number/query?phone_number=$phoneNumber&api_key=$apiKey&country_code=$countryCode",
    headers: <String, String>{
      'Content-Type': 'application/json; charset=UTF-8',
    },
  );
  return response;
}