smsnetbd.csharp.client 1.0.0

dotnet add package smsnetbd.csharp.client --version 1.0.0
NuGet\Install-Package smsnetbd.csharp.client -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="smsnetbd.csharp.client" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add smsnetbd.csharp.client --version 1.0.0
#r "nuget: smsnetbd.csharp.client, 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.
// Install smsnetbd.csharp.client as a Cake Addin
#addin nuget:?package=smsnetbd.csharp.client&version=1.0.0

// Install smsnetbd.csharp.client as a Cake Tool
#tool nuget:?package=smsnetbd.csharp.client&version=1.0.0

sms.net.bd NuGet Package Note

Summary:

The sms.net.bd NuGet package provides a simple interface to send SMS messages using the sms.net.bd API. This release introduces initial support for sending SMS messages, scheduling SMS messages, checking SMS delivery reports, and retrieving account balances.

Initialization:

To start using the sms.net.bd NuGet package, follow these steps:

  1. Install the Package: Install the sms.net.bd NuGet package in your project using the following command in the NuGet Package Manager Console:

    NuGet\Install-Package smsnetbd.Csharp.Client
    
  2. Initialize SMS Client: Create an instance of the SMS class by providing your API key. This API key can be obtained from the sms.net.bd API website.

    using sms.net.bd;
    
    // Initialize SMS client with your API key
    SMS smsClient = new SMS("Your-API-Key");
    

Usage:

After initializing the SMS client, you can use its methods to interact with the sms.net.bd API. Below are the available methods and their usage:

  1. SendSMS: Send a text message to a specified phone number.

    // Send SMS message
    string phoneNumber = "01800000000";
    string message = "Hello, world!";
    string sender_id = "xxxxxxx"  //Optional. If you have an approved Sender ID. 
    string response = await smsClient.SendSMS(phoneNumber, message, sender_id);
    

    Response

    {
      "error": 0,
      "msg": "Request successfully submitted",
      "data": {
        "request_id": 0000
      }
    }
    
  2. ScheduleSMS: Schedule a text message to be sent at a specified time.

    // Schedule SMS message
    string phoneNumber = "01800000000";
    string message = "Hello, world!";
    string scheduleTime = "2023-11-01 12:00:00"; // Specify the scheduled time in ISO 8601 format
    string response = await smsClient.ScheduleSMS(phoneNumber, message, scheduleTime);
    

    Response

    {
      "error": 0,
      "msg": "Request successfully submitted"
    }
    
  3. GetReport: Retrieve the delivery report of an SMS message.

    // Get SMS delivery report
    string messageId = 12345; // Specify the ID of the SMS message
    string report = await smsClient.GetReport(messageId);
    

    Response

     {
       "error":0,
       "msg":"Success",
       "data":{"request_id":000000,
     	 "request_status":"Complete",
     	 "request_charge":"0.0000",
     	 "recipients":[
     	  {
     		"number":"01800000000",
     		"charge":"0.0000",
     		"status":"Sent"
     	  }
     	]
       }
     }
    
  4. GetBalance: Retrieve the current account balance.

    // Get account balance
    string balance = await smsClient.GetBalance();
    

    Response

     {
       "error": 0,
       "msg": "Success",
       "data": {
         "balance": "00.0000"
       }
     }
    

Error Codes:

Common Errors
Error - 0 Success. Everything worked as expected.
Error - 400 The request was rejected, due to a missing or invalid parameter.
Error - 403 You don't have permissions to perform the request.
Error - 404 The requested resource not found.
Error - 405 Authorization required.
Error - 409 Unknown error occurred on Server end.
Send SMS Errors
Error - 410 Account expired.
Error - 411 Reseller Account expired or suspended.
Error - 412 Invalid Schedule.
Error - 413 Invalid Sender ID.
Error - 414 Message is empty.
Error - 415 Message is too long.
Error - 416 No valid number found.
Error - 417 Insufficient balance.
Error - 418 Content Blocked.

Feedback and Support

We welcome your feedback and suggestions for improving the sms.net.bd NuGet package. If you encounter any issues or have questions, please contact [Your Contact Information] or open an issue on the GitHub repository.

Thank you for using sms.net.bd!

For more details on the sms.net.bd API and its usage, refer to the official API documentation.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
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.0 247 2/8/2024

# sms.net.bd NuGet Package Release Note

### Summary:
The sms.net.bd NuGet package provides a simple interface to send SMS messages using the sms.net.bd API. This release introduces initial support for sending SMS messages, scheduling SMS messages, checking SMS delivery reports, and retrieving account balances.

### Initialization:
To start using the sms.net.bd NuGet package, follow these steps:

1. **Install the Package**: Install the sms.net.bd NuGet package in your project using the following command in the NuGet Package Manager Console:

  ```shell
  NuGet\Install-Package smsnetbd.Csharp.Client
  ```

2. **Initialize SMS Client**: Create an instance of the `SMS` class by providing your API key. This API key can be obtained from the [sms.net.bd API website](https://www.sms.net.bd/api).

  ```csharp
  using sms.net.bd;

  // Initialize SMS client with your API key
  SMS smsClient = new SMS("Your-API-Key");
  ```

### Usage:
After initializing the SMS client, you can use its methods to interact with the sms.net.bd API. Below are the available methods and their usage:

1. **SendSMS**: Send a text message to a specified phone number.

  ```csharp
  // Send SMS message
  string phoneNumber = "01800000000";
  string message = "Hello, world!";
  string sender_id = "xxxxxxx"  //Optional. If you have an approved Sender ID.
  string response = await smsClient.SendSMS(phoneNumber, message, sender_id);
  ```
  > Response
   ```json
   {
     "error": 0,
     "msg": "Request successfully submitted",
     "data": {
       "request_id": 0000
     }
   }
   ```
2. **ScheduleSMS**: Schedule a text message to be sent at a specified time.

  ```csharp
  // Schedule SMS message
  string phoneNumber = "01800000000";
  string message = "Hello, world!";
  string scheduleTime = "2023-11-01 12:00:00"; // Specify the scheduled time in ISO 8601 format
  string response = await smsClient.ScheduleSMS(phoneNumber, message, scheduleTime);
  ```
  > Response

   ```json
   {
     "error": 0,
     "msg": "Request successfully submitted"
   }
   ```
3. **GetReport**: Retrieve the delivery report of an SMS message.

  ```csharp
  // Get SMS delivery report
  string messageId = 12345; // Specify the ID of the SMS message
  string report = await smsClient.GetReport(messageId);
  ```
  > Response
```json
{
  "error":0,
  "msg":"Success",
  "data":{"request_id":000000,
  "request_status":"Complete",
  "request_charge":"0.0000",
  "recipients":[
   {
  "number":"01800000000",
  "charge":"0.0000",
  "status":"Sent"
   }
 ]
  }
}
```
4. **GetBalance**: Retrieve the current account balance.

  ```csharp
  // Get account balance
  string balance = await smsClient.GetBalance();
  ```
> Response
```json
    {
      "error": 0,
      "msg": "Success",
      "data": {
        "balance": "00.0000"
      }
    }
```

### Error Codes:

| Common Errors |  |
|--|--|
| Error - 0 | Success. Everything worked as expected. |
| Error - 400 | The request was rejected, due to a missing or invalid parameter. |
| Error - 403 | You don't have permissions to perform the request. |
| Error - 404 | The requested resource not found. |
| Error - 405 | Authorization required. |
| Error - 409 | Unknown error occurred on Server end. |


| Send SMS Errors |  |
|--|--|
| Error - 410 | Account expired. |
| Error - 411 | Reseller Account expired or suspended. |
| Error - 412 | Invalid Schedule. |
| Error - 413 | Invalid Sender ID. |
| Error - 414 | Message is empty. |
| Error - 415 | Message is too long. |
| Error - 416 | No valid number found. |
| Error - 417 | Insufficient balance. |
| Error - 418 | Content Blocked. |

### Feedback and Support

We welcome your feedback and suggestions for improving the sms.net.bd NuGet package. If you encounter any issues or have questions, please contact [Your Contact Information] or open an issue on the GitHub repository.

Thank you for using sms.net.bd!


For more details on the sms.net.bd API and its usage, refer to the [official API documentation](https://www.sms.net.bd/api).