Infobip.Api.SDK 1.0.3

dotnet add package Infobip.Api.SDK --version 1.0.3
NuGet\Install-Package Infobip.Api.SDK -Version 1.0.3
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="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
#r "nuget: Infobip.Api.SDK, 1.0.3"
#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.
// 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

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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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 6,770 4/11/2022
1.0.2 1,425 4/5/2022
1.0.1 418 4/5/2022
1.0.0 444 3/2/2022