Verify a #US Driver’s License via an #API in C#

This is an API I discovered while hunting on Rapid API, and it seems like an interesting find, and potential future addition to RegCheck – It’s a Driver License verification API for the US, in some 37 states, which is most of the country – here; https://rapidapi.com/appaio/api/drivers-license-verify-usa/

var driversLicense = new
{
State = “FL”,
DriversLicense = “W426-545-30-761-0”, // This particular driver is deceased
Firstname = “”, // Not required in Florida
Surname = “”, // Not required in Florida
Last4SSN = “”, // Not required in Florida
DateOfBirth = “”, // Not required in Florida
ZipCode = “” // Not required in Florida
};
var payload = JsonConvert.SerializeObject(driversLicense);
using (var web = new WebClient())
{
// Get Key here: https://rapidapi.com/appaio/api/drivers-license-verify-usa/
web.Headers.Add(“x-rapidapi-key”, “*** Put Rapid API key here ***”);
var result = web.UploadString(“https://drivers-license-verify-usa.p.rapidapi.com/DriversLicenseLambda”,
payload);
Console.WriteLine(result);
var json = JObject.Parse(result);
var valid = json[“valid”];
var endorsements = json[“endorsements”];
var validity = json[“validity”];
var information = json[“information”];
}

Leave a Reply

Your email address will not be published.