Free numbers

Public numbers and their SMS — client.Free. No API key needed.

ListAsync

Countries, the numbers of the selected country and the SMS of the selected number, in one call.

Task<FreeList> ListAsync(int? country = null, string? number = null, int? page = null, int? count = null, CancellationToken cancellationToken = default)
ParamTypeDefaultDescription
countryint?44 (server)Country code; an unknown one falls back to the first available.
numberstring?first numberNumber without the country code, as the keys of Numbers.
pageint?1Page of Messages.
countint?server defaultSMS per page, 10–500.

FreeList:

  • Countries: list of FreeCountry — Country, CountryText, CountryOriginal
  • Numbers: IReadOnlyDictionary<string, FreeNumber> keyed by the short number — Country, CountryOriginal, FullNumber, DataHumans, IsArchive
  • Messages: a paginator of FreeMessage (Id, Text, InNumber, MyNumber, Code, CreatedAt, DataHumans) plus Number and Country; Code is - when no code was found
var numbers = (await client.Free.ListAsync(country: 44)).Numbers;
var shortNumber = numbers.Keys.FirstOrDefault();
if (shortNumber != null)
{
    var messages = (await client.Free.ListAsync(country: 44, number: shortNumber, count: 20)).Messages;
    foreach (var sms in messages.Data) Console.WriteLine($"{sms.InNumber} {sms.Code} {sms.Text}");
}