Integrax 1.0.0
dotnet add package Integrax --version 1.0.0
NuGet\Install-Package Integrax -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Integrax" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Integrax" Version="1.0.0" />
<PackageReference Include="Integrax" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Integrax --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Integrax, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Integrax@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Integrax&version=1.0.0
#tool nuget:?package=Integrax&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Integrax SDK para .NET
SDK oficial da Integrax para .NET 8.0+ — SMS, RCS, OTP e consultas via API.
Obtendo seu token
- Crie uma conta gratuita em integrax.app
- Após o cadastro, acesse o menu API e crie um token
Pronto, você já pode integrar!
Se receber
MESSAGE_NOT_ALLOWED, entre em contato com o suporte pelo WhatsApp e solicite a liberação.
Instalacao
dotnet add package Integrax
Ou adicione ao .csproj:
<PackageReference Include="Integrax" Version="1.0.0" />
Inicio rapido
using Integrax;
using var ix = new IntegraxClient("seu-token-aqui");
// Enviar SMS
var res = await ix.Sms.SendAsync(["5511999999999"], "Pedido confirmado!");
Console.WriteLine(res.Data?[0].MessageId);
Exemplos
SMS
// Envio simples
var res = await ix.Sms.SendAsync(["5511999999999"], "Pedido confirmado");
// Multiplos destinatarios
var res = await ix.Sms.SendAsync(
["5511999999999", "5511988888888"],
"Promocao especial!"
);
// Com shortcode customizado
var res = await ix.Sms.SendAsync(
["5511999999999"],
"Ola!",
from: "29094"
);
OTP (One-Time Password)
// Envio minimo (usa defaults: 6 digitos, numerico, expira em 10 min)
var res = await ix.Otp.SendAsync("5511999999999");
// Personalizado: 5 digitos, alfanumerico, expira em 5 minutos
var res = await ix.Otp.SendAsync(
"5511999999999",
qtdDigits: 5,
withText: true,
expiresIn: 5
);
// Com mensagem customizada
var res = await ix.Otp.SendAsync(
"5511999999999",
messageDefault: "Use [code] para confirmar sua conta"
);
// Verificar codigo
var verify = await ix.Otp.VerifyAsync("1MP5L", "5511999999999");
if (verify.Status == "verified")
{
Console.WriteLine("Codigo valido!");
}
RCS
// Mensagem BASIC
var res = await ix.Rcs.SendAsync(
["5511999999999"],
"Ola! Mensagem RCS basica.",
"IntegraX",
rcsType: "BASIC"
);
// Mensagem RICH com card
var res = await ix.Rcs.SendAsync(
["5511999999999"],
"Confira nossa oferta!",
"IntegraX",
rcsMessage: new
{
card = new
{
title = "Black Friday",
description = "Ate 60% OFF.",
media = new
{
file = new { url = "https://exemplo.com/banner.png" },
height = "MEDIUM"
},
suggestions = new[]
{
new
{
type = "OPEN_URL",
text = "Ver ofertas",
url = "https://exemplo.com/ofertas",
postbackData = "click_ofertas"
}
}
}
}
);
Creditos
var balance = await ix.Credits.BalanceAsync();
Console.WriteLine($"Saldo: {balance.Credits}");
Consultas
// Consulta por CPF
var res = await ix.Consult.CpfAsync(["00000000001"]);
// CPF com telefones validos e restricoes
var res = await ix.Consult.CpfAsync(
["00000000001"],
showPhoneValid: true,
showRestrictions: true
);
// Consulta por telefone
var res = await ix.Consult.PhoneAsync(["551199999999"]);
// Consulta premium por telefone
var res = await ix.Consult.PhonePremiumAsync(["551199999999"]);
Números internacionais
- Para números de outros países, insira
+na frente do número (ex:+34992000000). - Para envios internacionais, é necessário solicitar a ativação da rota através do suporte.
- Alguns países permitem
frompersonalizado. Se permitido, basta informar ofromno payload.
Tratamento de erros
try
{
var res = await ix.Sms.SendAsync(["5511999999999"], "Teste");
}
catch (IntegraxException ex)
{
Console.WriteLine($"Status: {ex.Status}");
Console.WriteLine($"Mensagem: {ex.Message}");
Console.WriteLine($"Codigo: {ex.ErrorCode}");
Console.WriteLine($"Body: {ex.Body}");
}
CancellationToken
Todos os metodos aceitam CancellationToken como ultimo parametro:
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(10));
var res = await ix.Sms.SendAsync(["5511999999999"], "Teste", ct: cts.Token);
HttpClient customizado
Voce pode injetar seu proprio HttpClient (util com IHttpClientFactory):
var httpClient = httpClientFactory.CreateClient("integrax");
using var ix = new IntegraxClient("seu-token", httpClient: httpClient);
Referencia da API
| Servico | Metodo | Descricao |
|---|---|---|
Sms |
SendAsync |
Envia SMS para um ou mais numeros |
Otp |
SendAsync |
Envia codigo OTP via SMS |
Otp |
VerifyAsync |
Valida um codigo OTP |
Rcs |
SendAsync |
Envia mensagem RCS (BASIC/RICH) |
Credits |
BalanceAsync |
Consulta saldo de creditos |
Consult |
CpfAsync |
Consulta dados por CPF |
Consult |
PhoneAsync |
Consulta dados por telefone |
Consult |
PhonePremiumAsync |
Consulta premium por telefone |
Licenca
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 121 | 4/12/2026 |