{"id":37384914,"url":"https://github.com/smsglobal/smsglobal-dotnet","last_synced_at":"2026-01-16T05:18:15.431Z","repository":{"id":38400660,"uuid":"266028353","full_name":"smsglobal/smsglobal-dotnet","owner":"smsglobal","description":"SMSGlobal C# library","archived":false,"fork":false,"pushed_at":"2022-12-09T15:24:43.000Z","size":2424,"stargazers_count":3,"open_issues_count":6,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-11-27T13:35:04.343Z","etag":null,"topics":["dotnet","dotnet-library","nuget","smsglobal"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smsglobal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-22T05:44:17.000Z","updated_at":"2022-12-31T04:13:08.000Z","dependencies_parsed_at":"2023-01-25T14:30:18.712Z","dependency_job_id":null,"html_url":"https://github.com/smsglobal/smsglobal-dotnet","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/smsglobal/smsglobal-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsglobal%2Fsmsglobal-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsglobal%2Fsmsglobal-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsglobal%2Fsmsglobal-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsglobal%2Fsmsglobal-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smsglobal","download_url":"https://codeload.github.com/smsglobal/smsglobal-dotnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsglobal%2Fsmsglobal-dotnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","dotnet-library","nuget","smsglobal"],"created_at":"2026-01-16T05:18:14.795Z","updated_at":"2026-01-16T05:18:15.420Z","avatar_url":"https://github.com/smsglobal.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SMSGlobal Dotnet\n\n![.NET Core](https://github.com/smsglobal/smsglobal-dotnet/workflows/.NET%20Core/badge.svg)\n[![Nuget](https://img.shields.io/nuget/v/SMSGlobal)](https://www.nuget.org/packages/SMSGlobal)\n![Coverage](https://img.shields.io/codecov/c/gh/smsglobal/smsglobal-dotnet)\n![downloads](https://img.shields.io/nuget/dt/smsglobal)\n\n## SMSGlobal REST API and Libraries for .NET\n\nThis is an SDK for SMSGlobal’s REST API that supports .NET applications written in C#, VB.Net, and F# to enable SMS and opt out functionality.\n\nSign up for a [free SMSGlobal account](https://www.smsglobal.com/mxt-sign-up/?utm_source=dev\u0026utm_medium=github\u0026utm_campaign=dotnet_sdk) today and get your API Key from our advanced SMS platform, MXT. Plus, enjoy unlimited free developer sandbox testing to try out your API in full!\n\n## Supported .NET versions\n\nThis library supports .NET applications written in C#, VB.Net, and F# that utilize .NET Standard 2.1 which supports .NET Core 3.0 and unavailable for .NET Framework. [supported version](https://docs.microsoft.com/en-us/dotnet/standard/net-standard)\n\n## Installation\n\nThe best and easiest way to add the SMSGlobal libraries to your .NET project is to use the NuGet package manager.\n\n### With Visual Studio IDE\n\nFrom within Visual Studio, you can use the NuGet GUI to search for and install the SMSGlobal NuGet package. Or, as a shortcut, simply type the following command into the Package Manager Console:\n\n    Install-Package SMSGlobal\n\n### With .NET Core Command Line Tools\n\nIf you are building with the .NET Core command line tools, then you can run the following command from within your project directory:\n\n    dotnet add package SMSGlobal\n    \n### Azure functions\n\nFrom within Visual Studio while creating azure function app, you can use the NuGet GUI to search for and install the SMSGlobal NuGet package. Or, as a shortcut, simply type the following command into the Package Manager Console:\n\n    Install-Package SMSGlobal\n    \nMore information can be found here. [Nuget Client Tools](https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools)\n\n## Configuration\n\nFirst import the package by using SMSGlobal api:\n\n```csharp\nusing SMSGlobal.api;\n```\nTo setup the configuration of the SMSGlobal client you have to create following object with Rest and Secret API keys.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n```\nAnd then consume the function like this:\n\n```csharp\nvar response = await client.SMS.SMSSend(new\n{\n    origin = \"Test\",\n    destination = \"DESTINATION-NUMBER\",\n    message = \"This is a test message\"\n});\n```\nThe response object will contain the result object and also two keys fields:\n\n1. statuscode: This code can be used to determine the outcome of the call. Based on data passed you can get different status codes such as 400, 404, 200 etc.\n\n2. statusmessages: This message can be used to determine the outcome of the call. Each status code has a status message linked. \n\nEach api call have different status codes and messages, more info about status codes can be found here. [Rest API](https://www.smsglobal.com/rest-api/?utm_source=dev\u0026utm_medium=github\u0026utm_campaign=dotnet_sdk)\n\n### Configuration Reference\n\nKey | Description\n----|------------\nSMSGLOBAL-API-KEY | Your REST API key from the [MXT](https://mxt.smsglobal.com/integrations?utm_source=dev\u0026utm_medium=github\u0026utm_campaign=dotnet_sdk)\nSMSGLOBAL-SECRET-KEY | Your REST API secret from the [MXT](https://mxt.smsglobal.com/integrations?utm_source=dev\u0026utm_medium=github\u0026utm_campaign=dotnet_sdk)\n\n## Examples\n\nThe following examples show how to: \n\n### SMS\n\n * [Sending a message](#sending-a-message)\n * [Receive all messages](#receive-all-messages)\n * [Get message by Id](#get-message-by-id)\n * [Delete message](#delete-message)\n\n### SMS-Incoming\n\n * [Get all incoming messages](#get-all-incoming-messages)\n * [Get incoming message by Id](#get-incoming-message-by-id)\n * [Delete incoming message](#delete-incoming-message)\n\n### Opt-Outs\n\n * [Get all opted out numbers](#get-all-opted-out-numbers)\n * [Opt out number](#opt-out-number)\n * [Validate for opt out](#validate-opt-out)\n * [Opt in number](#opt-in-number)\n \n### OTP\n\n * [Send OTP](#send-otp)\n * [Verify OTP](#verify-otp)\n * [Cancel OTP](#cancel-otp)\n \n\nMore info can be found here. [SMSGlobal Rest API](https://www.smsglobal.com/rest-api/?utm_source=dev\u0026utm_medium=github\u0026utm_campaign=dotnet_sdk#api-endpoints)\n \n### Sending a Message\n\nThis can be used to send a single message.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nvar response = await client.SMS.SMSSend(new\n{\n    origin = \"Test\",\n    destination = \"DESTINATION-NUMBER\",\n    message = \"This is a test message\"\n});\n```\n\nThis can be used to send a multiple messages.\n\n```csharp\n\nObject[] messages = new Object[2];\n\nmessages[0] = new {\norigin = \"Test\",\ndestination = \"DESTINATION-NUMBER-1\",\nmessage = \"This is a test message\"\n};\n\nmessages[1] = new {\norigin = \"Test\",\ndestination = \"DESTINATION-NUMBER-2\",\nmessage = \"This is a test message\"\n};\n\nvar response = await client.SMS.SMSSend(new { messages = messages });\n\t\t\t\n```\nThe response object will contain collection of outgoing message objects.\n\nThis can be used to send to multiple destinations.\n\n```csharp\nstring[] destinations = new string[2];\n\ndestinations[0] = \"DESTINATION-NUMBER-1\";\ndestinations[1] = \"DESTINATION-NUMBER-2\";\n\nvar response = await client.SMS.SMSSend(new\n{\n   origin = \"Test\",\n   destinations = destinations,\n   message = \"This is a test message\"\n});\n```\nThe response object will contain collection of outgoing message objects.\n\nSame way we can send mutiple messages of array having multiple destinations array in it.\n\n```csharp\n\nObject[] messages = new Object[2];\n\nstring[] destinations1 = new string[2];\n\ndestinations[0] = \"DESTINATION-NUMBER-1\";\ndestinations[1] = \"DESTINATION-NUMBER-2\";\n\nstring[] destinations2 = new string[2];\n\ndestinations[0] = \"DESTINATION-NUMBER-3\";\ndestinations[1] = \"DESTINATION-NUMBER-4\";\n\nmessages[0] = new {\norigin = \"Test\",\ndestinations = destinations1,\nmessage = \"This is a test message\"\n};\n\nmessages[1] = new {\norigin = \"Test\",\ndestinations = destinations2,\nmessage = \"This is a test message\"\n};\n\nvar response = await client.SMS.SMSSend(new { messages = messages });\n\n```\nThe response object will contain collection of outgoing message objects.\n\nGiven below is one example of how the response will look like:\n\n```csharp\n{\n \"id\":\"6019398301583935\",\n \"outgoing_id\":\"5922424533\",\n \"origin\":\"Test\",\n \"message\":\"This is a test message\",\n \"dateTime\":\"2021-02-17 23:40:56 +0000\",\n \"status\":\"sent\"\n}\n```\n\n### Receive all Messages\n\nThis can be used to view list of all outgoing messages. The messages returned can be filtered based on different condition.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring filter = \"limit=1\";\nvar response = await client.SMS.SMSGetAll(filter);\n```\nThe response object will contain all the sms sent messages objects such as:\n\n```csharp\n{\n{\n \"id\":\"6019398301583935\",\n \"outgoing_id\":\"5922424533\",\n \"origin\":\"Test\",\n \"message\":\"This is a test message 1\",\n \"dateTime\":\"2021-02-18 10:40:56 +1100\",\n \"status\":\"delivered\"\n},\n{\n \"id\":\"6019398301583936\",\n \"outgoing_id\":\"5922424524\",\n \"origin\":\"Test\",\n \"message\":\"This is a test message 2\",\n \"dateTime\":\"2021-02-18 10:40:56 +1100\",\n \"status\":\"delivered\"\n}\n}\n```\n\n### Get Message By Id\n\nThis can be used to view details of an outgoing message.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring id = \"SMSGLOBAL-OUTGOING-ID\";\nvar response = await client.SMS.SMSGetId(id);\n```\nThe response object will contain details of the message such as:\n\n```csharp\n{\n \"id\":\"6019398301583935\",\n \"outgoing_id\":\"5922424533\",\n \"origin\":\"Test\",\n \"message\":\"This is a test message\",\n \"dateTime\":\"2021-02-17 23:40:56 +0000\",\n \"status\":\"sent\"\n}\n```\n\n### Delete Message\n\nThis can be used to delete outgoing message.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring id = \"SMSGLOBAL-OUTGOING-ID\";\nvar response = await client.SMS.SMSDeleteId(id);\n```\n\nThe reponse of this request will return status code where 204 means message deleted successfully.\n\n### Get All Incoming Messages\n\nThis can be used to get all incoming messages. The messages returned can be filtered based on different condition.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\n string filter = \"limit=1\";\n var response = await client.SMS.SMSGetIncoming(filter);\n```\nThe response object will contain all the incoming messages objects such as:\n\n```csharp\n{\n \"id\":\"490571921\",\n \"outgoing_id\":null,\n \"origin\":\"61450000000\",\n \"message\":\"Test\",\n \"dateTime\":\"2021-02-15 13:54:43 +1100\",\n \"status\":null\n}\n```\n\n### Get Incoming Message By Id\n\nThis can be used to view details of an incoming message.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring id = \"INCOMING-NUMBER\";\nvar response = await client.SMS.SMSDeleteIncoming(id);\n```\nThe response object will contain details of the incoming message such as:\n\n```csharp\n{\n \"id\":\"490571921\",\n \"outgoing_id\":null,\n \"origin\":\"61450000000\",\n \"message\":\"Test\",\n \"dateTime\":\"2021-02-15 13:54:43 +1100\",\n \"status\":null\n}\n```\n\n### Delete Incoming Message\n\nThis can be used to delete an incoming message.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring id = \"SMSGLOBAL-OUTGOING-ID\";\nvar response = await client.SMS.SMSGetIncomingById(id);\n```\nThe reponse of this request will return status code where 204 means message deleted successfully.\n\n### Get All Opted Out Numbers\n\nThis can be used to get all opted out numbers. The numbers returned can be filtered based on different condition.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring filter = \"\";\nvar response = await client.SMS.SMSGetOptOuts(filter);\n```\nThe response object will contain all the opted number objects such as:\n\n```csharp\n{\n \"date\":\"2021-02-18\",\n \"number\":\"16789253159\",\n \"status\":null\n}\n```\n\n### Opt Out Number\n\nThis can be used to opt out numbers.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nObject[] payload = new Object[2];\npayload[0] = new\n{\n    number = \"MOBILE-NUMBER\"\n};\npayload[1] = new\n{\n    number = \"MOBILE-NUMBER\"\n};\n\nvar response = await client.SMS.SMSPostOptOut(new { optouts = payload });\n```\nThe response object will contain collection of Opt out number object. Optout object consist of number and status(exist, valid, and invalid) properties such as:\n\n```csharp\n{\n \"date\":\"2021-02-18\",\n \"number\":\"16789253159\",\n \"status\":valid\n}\n```\n\n### Validate Opt Out\n\nThis can be used to validate mobile numbers for opt-out.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nObject[] payload = new Object[2];\npayload[0] = new\n{\n    number = \"MOBILE-NUMBER\"\n};\npayload[1] = new\n{\n    number = \"MOBILE-NUMBER\"\n};\n\nvar response = await client.SMS.SMSPostOptOutValidate(new { optouts = payload });\n```\nThe response object will contain collection of Opt out number object. Optout object consist of number and status(exist, valid, and invalid) properties such as:\n\n```csharp\n{\n \"date\":\"2021-02-18\",\n \"number\":\"16789253159\",\n \"status\":valid\n}\n```\n\n### Opt In Number\n\nThis can be used to opt in a number.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring number = \"MOBILE-NUMBER\";\nvar response = await client.SMS.SMSDeleteOptOut(number);\n```\nThe reponse of this request will return status code where 204 means opted-in successfully.\n\n### Send OTP\n\nThis can be used for sending OTP.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nvar response = await client.OTP.OTPSend(new\n{\n    message = \"{*code*} is your SMSGlobal verification code.\",\n    destination = \"DESTINATION-NUMBER\",\n});\n```\nThe response object will contain OTP details such as request id, destination number such as:\n\n```csharp\n{\n \"requestId\":\"409261431691990777288109\",\n \"destination\":\"61450000000\",\n \"validUnitlTimestamp\":\"2021-02-18 11:39:07\",\n \"createdTimestamp\":\"2021-02-18 11:29:07\",\n \"lastEventTimestamp\":\"2021-02-18 11:29:08\",\n \"status\":\"Sent\",\n \"statuscode\":200,\n \"statusmessage\":\"OK\"\n}\n```\n\n### Verify OTP\n\nThe OTP code entered by your user can be verified by either using requestId or destination number.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring requestid = \"REQUEST-ID\";\nstring code = \"OTP-CODE\";\nvar response = await client.OTP.OTPValidateRequest(requestid, new\n{\n   code = code,\n});\n```\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring destinationid = \"DESTINATION-NUMBER\";\nstring code = \"OTP-CODE\";\nvar response = await client.OTP.OTPValidateDestination(destinationid, new\n{\n   code = code,\n});\n```\nThe response object will contain OTP details such as request id, destination number such as:\n\n```csharp\n{\n \"requestId\":\"409261431691990777288109\",\n \"destination\":\"61450000000\",\n \"validUnitlTimestamp\":\"2021-02-18 11:39:07\",\n \"createdTimestamp\":\"2021-02-18 11:29:07\",\n \"lastEventTimestamp\":\"2021-02-18 11:29:08\",\n \"status\":\"Verified\",\n \"statuscode\":200,\n \"statusmessage\":\"OK\"\n}\n```\n\n### Cancel OTP\n\nThe OTP request can be cancelled if an OTP is not expired and verified yet. It can be done by either using requestId or destination number.\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring requestid = \"REQUEST-ID\";\nvar response = await client.OTP.OTPCancelRequest(requestid);\n```\n\n```csharp\nvar client = new Client(new Credentials(\"SMSGLOBAL-API-KEY\", \"SMSGLOBAL-SECRET-KEY\"));\n\nstring destination = \"DESTINATION-NUMBER\";\nvar response = await client.OTP.OTPCancelDestination(destination);\n```\nThe response object will contain OTP details such as request id, destination number such as:\n\n```csharp\n{\n \"requestId\":\"409261431691990777288109\",\n \"destination\":\"61450000000\",\n \"validUnitlTimestamp\":\"2021-02-18 11:39:07\",\n \"createdTimestamp\":\"2021-02-18 11:29:07\",\n \"lastEventTimestamp\":\"2021-02-18 11:29:08\",\n \"status\":\"Cancelled \",\n \"statuscode\":200,\n \"statusmessage\":\"OK\"\n}\n```\n\n## Getting help\n\nView the [REST API](https://www.smsglobal.com/rest-api/?utm_source=dev\u0026utm_medium=github\u0026utm_campaign=dotnet_sdk) documentation for a list of available resources.\n\nFor any query [contact us](https://www.smsglobal.com/contact/?utm_source=dev\u0026utm_medium=github\u0026utm_campaign=dotnet_sdk) \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmsglobal%2Fsmsglobal-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmsglobal%2Fsmsglobal-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmsglobal%2Fsmsglobal-dotnet/lists"}