Cascade provides a REST API. Below is a practical minimum in C# with the HttpClient client.
Useful links: API, send, verify, examples, FAQ, pricing, documentation.
Installation
dotnet add package System.Net.Http.Json
An official Cascade NuGet package may not exist.
Init + send
using var http = new HttpClient { BaseAddress = new Uri("https://cascade.kz/api/") };
http.DefaultRequestHeaders.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("OTP_API_TOKEN"));
http.DefaultRequestHeaders.Accept.ParseAdd("application/json");
var send = await http.PostAsJsonAsync("otp/send", new { phone = "77001234567", purpose = "verification" });
var sendBody = await send.Content.ReadFromJsonAsync<JsonElement>();
Verify
var verify = await http.PostAsJsonAsync("otp/verify", new { phone = "77001234567", code = "482910", purpose = "verification" });
Check the success property. See API, documentation, use-cases.