Infobip.Api.SDK 1.0.3

.NET Standard 2.0
Install-Package Infobip.Api.SDK -Version 1.0.3
dotnet add package Infobip.Api.SDK --version 1.0.3
<PackageReference Include="Infobip.Api.SDK" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Infobip.Api.SDK --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Infobip.Api.SDK, 1.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Infobip.Api.SDK as a Cake Addin
#addin nuget:?package=Infobip.Api.SDK&version=1.0.3

// Install Infobip.Api.SDK as a Cake Tool
#tool nuget:?package=Infobip.Api.SDK&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Infobip API C# SDK

This is a C# SDK for Infobip API and you can use it as a dependency to add Infobip APIs features to your application. To use this, you'll need an Infobip account. If you do not own one, you can create a free account here.

Table of contents:

General Info

For Infobip API C# SDK versioning we use Semantic Versioning scheme.

This library is targeting .NET Standard 2.0. When a library is built against a certain version of .NET Standard, it can run on any .NET implementation that implements that version of .NET Standard (or higher)

License

Published under MIT License.

Installation

To start using the Infobip API C# SDK library add it as dependency to your project. You should install Infobip API C# SDK:

Install-Package Infobip.Api.SDK

Or via the .NET Core command line interface:

dotnet add package Infobip.Api.SDK

Either commands, from Package Manager Console or .NET Core CLI, will download and install Infobip API C# SDK and all required dependencies.

Usage Example

Call example used to send WhatsApp text message

public async Task<WhatsAppSingleMessageInfoResponse> SendWhatsAppTextMessage()
{
    var configuration = new ApiClientConfiguration(
        "https://XYZ.api.infobip.com",
        "YOUR_API_KEY_FROM_PORTAL");

    var client = new InfobipApiClient(configuration);

    var request = new WhatsAppTextMessageRequest
    {
        From = "FROM_NUMBER",
        To = "TO_NUMBER",
        MessageId = "MESSAGE_ID",
        Content = new WhatsAppTextContent("Message Text!")
    };
    return await client.WhatsApp.SendWhatsAppTextMessage(request);
}

Exceptions

There are several exceptions defined and they can be thrown by InfobipApiClient class, if some error occurs when calling an API endpoint:

  • InfobipException - Occurs during api endpoint call execution in case of general error.
  • InfobipRequestNotValidException - Occurs during api endpoint call execution when request model is not valid.
  • InfobipBadRequestException - Occurs during api endpoint call execution when http response status code is BadRequest (400).
  • InfobipUnauthorizedException - Occurs during api endpoint call execution when http response status code is Unauthorized (401).
  • InfobipForbiddenException - Represents errors that occurs during api endpoint call execution in case when http response status code is Forbidden (403).
  • InfobipNotFoundException - Represents errors that occurs during api endpoint call execution in case when http response status code is NotFound (404).
  • InfobipTooManyRequestsException - Represents errors that occurs during api endpoint call execution in case when http response status code is TooManyRequests (429).

Documentation

Infobip API Documentation can be found here.

Development

Feel free to participate in this open source project by following the standard fork → clone → edit → pull request workflow!

For running Tests you can use Visual Studio or your favorite console.

To run them from console, just change working directory to src directory, and run following command.

 dotnet test
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

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.3 87 4/11/2022
1.0.2 64 4/5/2022
1.0.1 62 4/5/2022
1.0.0 75 3/2/2022