Use this method to check if a phone number is available.
The phone number.
+48111222333
using System.Threading.Tasks;
internal class Program
{
private static void Main(string[] args)
{
string requestBody = "{\"phone\":\"+48111222333\"}";
try {
using var client = new HttpClient{};
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.messageflow.com/v2.1/sms/hlr");
request.Headers.Add("Authorization", "YourAuthorizationKey");
request.Headers.Add("Application-Key", "YourApplicationKey");
request.Content = new StringContent(requestBody, null, "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
string content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
} catch (HttpRequestException e) {
Console.WriteLine("\n Exception Caught!\n Message :{0} ", e.Message);
}
}
}
{
"meta": {
"numberOfErrors": 0,
"numberOfData": 1,
"status": 200,
"uniqId": "00d928f759"
},
"data": [
{
"phone": "text",
"status": "text",
"imsi": null,
"network": "text",
"ported": "text",
"networkPorted": "text",
"description": "text"
}
]
}