{"id":25097245,"url":"https://github.com/messagemedia/webhooks-csharp-sdk","last_synced_at":"2025-04-02T02:41:34.453Z","repository":{"id":79431359,"uuid":"131949978","full_name":"messagemedia/webhooks-csharp-sdk","owner":"messagemedia","description":"MessageMedia C# SDK for webhooks","archived":false,"fork":false,"pushed_at":"2018-07-07T10:34:06.000Z","size":368,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-07T17:38:26.934Z","etag":null,"topics":["csharp","csharp-sdk","messagemedia","messaging","sms","sms-api","sms-client","sms-gateway","sms-messages","webhooks","webhooks-api"],"latest_commit_sha":null,"homepage":"https://developers.messagemedia.com/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/messagemedia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-03T06:14:33.000Z","updated_at":"2018-07-07T10:34:07.000Z","dependencies_parsed_at":"2023-05-01T04:31:30.050Z","dependency_job_id":null,"html_url":"https://github.com/messagemedia/webhooks-csharp-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messagemedia%2Fwebhooks-csharp-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messagemedia%2Fwebhooks-csharp-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messagemedia%2Fwebhooks-csharp-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messagemedia%2Fwebhooks-csharp-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/messagemedia","download_url":"https://codeload.github.com/messagemedia/webhooks-csharp-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246746870,"owners_count":20827061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["csharp","csharp-sdk","messagemedia","messaging","sms","sms-api","sms-client","sms-gateway","sms-messages","webhooks","webhooks-api"],"created_at":"2025-02-07T17:30:49.935Z","updated_at":"2025-04-02T02:41:34.444Z","avatar_url":"https://github.com/messagemedia.png","language":"C#","readme":"# MessageMedia Webhooks C# SDK\n[![Travis Build Status](https://api.travis-ci.org/messagemedia/webhooks-csharp-sdk.svg?branch=master)](https://travis-ci.org/messagemedia/webhooks-csharp-sdk)\n[![Pull Requests Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com)\n[![NuGet version](https://badge.fury.io/nu/MessageMedia.SDK.Webhooks.svg)](https://badge.fury.io/nu/MessageMedia.SDK.Webhooks)\n\nThe MessageMedia Webhooks allows you to subscribe to one or several events and when one of those events is triggered, an HTTP request is sent to the URL of your choice along with the message or payload. In simpler terms, it allows applications to \"speak\" to one another and get notified automatically when something new happens.\n\n![Webhooks Flow](http://i66.tinypic.com/2ufxf81.jpg)\n\n## Table of Contents\n* [Authentication](#closed_lock_with_key-authentication)\n* [Errors](#interrobang-errors)\n* [Information](#newspaper-information)\n  * [Slack and Mailing List](#slack-and-mailing-list)\n  * [Bug Reports](#bug-reports)\n  * [Contributing](#contributing)\n* [Installation](#star-installation)\n* [Get Started](#clapper-get-started)\n* [API Documentation](#closed_book-api-documentation)\n* [Need help?](#confused-need-help)\n* [License](#page_with_curl-license)\n\n## :closed_lock_with_key: Authentication\n\nAuthentication is done via API keys. Sign up at https://developers.messagemedia.com/register/ to get your API keys.\n\nRequests are authenticated using HTTP Basic Auth or HMAC. Provide your API key as the auth_user_name and API secret as the auth_password.\n\n## :interrobang: Errors\n\nOur API returns standard HTTP success or error status codes. For errors, we will also include extra information about what went wrong encoded in the response as JSON. The most common status codes are listed below.\n\n#### HTTP Status Codes\n\n| Code      | Title       | Description |\n|-----------|-------------|-------------|\n| 400 | Invalid Request | The request was invalid |\n| 401 | Unauthorized | Your API credentials are invalid |\n| 403 | Disabled feature | Feature not enabled |\n| 404 | Not Found |\tThe resource does not exist |\n| 50X | Internal Server Error | An error occurred with our API |\n\n## :newspaper: Information\n\n#### Slack and Mailing List\n\nIf you have any questions, comments, or concerns, please join our Slack channel:\nhttps://developers.messagemedia.com/collaborate/slack/\n\nAlternatively you can email us at:\ndevelopers@messagemedia.com\n\n#### Bug reports\n\nIf you discover a problem with the SDK, we would like to know about it. You can raise an [issue](https://github.com/messagemedia/signingkeys-nodejs-sdk/issues) or send an email to: developers@messagemedia.com\n\n#### Contributing\n\nWe welcome your thoughts on how we could best provide you with SDKs that would simplify how you consume our services in your application. You can fork and create pull requests for any features you would like to see or raise an [issue](https://github.com/messagemedia/signingkeys-nodejs-sdk/issues)\n\n## :star: Installation\nInstall via NuGet by:\n\nPM\u003e ```Install-Package MessageMedia.SDK.Webhooks```\n\nAlternatively, right-click on your solution and click \"Manage NuGet Packages...\", then click browse and search for MessageMedia.\n\nVisual Studio Mac:\nProject -\u003e Add NuGet Packages -\u003e Search for 'MessageMedia'\n\n## :clapper: Get Started\nIt's easy to get started. Simply enter the API Key and secret you obtained from the [MessageMedia Developers Portal](https://developers.messagemedia.com) into the code snippet below.\n\n### Create a webhook\n```csharp\nusing System;\nusing MessageMedia.Webhooks;\nusing MessageMedia.Webhooks.Controllers;\nusing MessageMedia.Webhooks.Models;\n\nnamespace TestApp\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            // Configuration parameters and credentials\n            String basicAuthUserName = \"API_KEY\"; // The username to use with basic authentication\n            String basicAuthPassword = \"API_SECRET\"; // The password to use with basic authentication\n\n            MessageMediaWebhooksClient client = new MessageMediaWebhooksClient(basicAuthUserName, basicAuthPassword);\n\n            IWebhooksController webhooks = client.Webhooks;\n\n            string bodyValue = \"{\" +\n                \"\\\"url\\\": \\\"https://webhook.com\\\",\" +\n                \"\\\"method\\\": \\\"POST\\\",\" +\n                \"\\\"encoding\\\": \\\"JSON\\\",\" +\n                \"\\\"events\\\": [\\\"RECEIVED_SMS\\\"],\" +\n                \"\\\"template\\\": \\\"{\\\\\\\"id\\\\\\\":\\\\\\\"$mtId\\\\\\\", \\\\\\\"status\\\\\\\":\\\\\\\"$statusCode\\\\\\\"}\\\"\" +\n            \"}\";\n\n            var body = Newtonsoft.Json.JsonConvert.DeserializeObject\u003cCreateWebhookRequest\u003e(bodyValue);\n\n            dynamic result = webhooks.CreateWebhook(body);\n\n            Console.WriteLine(result);\n            Console.ReadKey();\n        }\n    }\n}\n\n```\n\n### Retrieve all webhooks\n```csharp\nusing System;\nusing MessageMedia.Webhooks;\nusing MessageMedia.Webhooks.Controllers;\nusing MessageMedia.Webhooks.Models;\n\nnamespace TestApp\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            // Configuration parameters and credentials\n            String basicAuthUserName = \"API_KEY\"; // The username to use with basic authentication\n            String basicAuthPassword = \"API_SECRET\"; // The password to use with basic authentication\n\n            MessageMediaWebhooksClient client = new MessageMediaWebhooksClient(basicAuthUserName, basicAuthPassword);\n\n            IWebhooksController webhooks = client.Webhooks;\n\n            int? page = 0;\n            int? pageSize = 0;\n\n            dynamic result = webhooks.RetrieveWebhook(page, pageSize);\n\n            Console.WriteLine(result);\n            Console.ReadKey();\n        }\n    }\n}\n\n\n```\n\n### Update a webhook\nYou can get a webhook ID by looking at the `id` of each webhook created from the response of the above example.\n```csharp\nusing System;\nusing MessageMedia.Webhooks;\nusing MessageMedia.Webhooks.Controllers;\nusing MessageMedia.Webhooks.Models;\n\nnamespace TestApp\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            // Configuration parameters and credentials\n            String basicAuthUserName = \"API_KEY\"; // The username to use with basic authentication\n            String basicAuthPassword = \"API_SECRET\"; // The password to use with basic authentication\n\n            MessageMediaWebhooksClient client = new MessageMediaWebhooksClient(basicAuthUserName, basicAuthPassword);\n\n            IWebhooksController webhooks = client.Webhooks;\n\n            Guid webhookId = \"WEBHOOK_ID\";\n\n            string bodyValue = \"{\" +\n                \"\\\"url\\\": \\\"https://myurl.com\\\",\" +\n                \"\\\"method\\\": \\\"POST\\\",\" +\n                \"\\\"encoding\\\": \\\"FORM_ENCODED\\\",\" +\n                \"\\\"events\\\": [\\\"ENROUTE_DR\\\"],\" +\n                \"\\\"template\\\": \\\"{\\\\\\\"id\\\\\\\":\\\\\\\"$mtId\\\\\\\", \\\\\\\"status\\\\\\\":\\\\\\\"$statusCode\\\\\\\"}\\\"\" +\n                \"}\";\n\n            var body = Newtonsoft.Json.JsonConvert.DeserializeObject\u003cWebhooks.Models.UpdateWebhookRequest\u003e(bodyValue);\n\n            dynamic result = await webhooks.UpdateWebhook(webhookId, body);\n\n            Console.WriteLine(result);\n            Console.ReadKey();\n        }\n    }\n}\n\n\n```\n\n### Delete a webhook\nYou can get a webhook ID by looking at the `id` of each webhook created from the response of the retrieve webhooks example.\n```csharp\nusing System;\nusing MessageMedia.Webhooks;\nusing MessageMedia.Webhooks.Controllers;\nusing MessageMedia.Webhooks.Models;\n\nnamespace TestApp\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            // Configuration parameters and credentials\n            String basicAuthUserName = \"API_KEY\"; // The username to use with basic authentication\n            String basicAuthPassword = \"API_SECRET\"; // The password to use with basic authentication\n\n            MessageMediaWebhooksClient client = new MessageMediaWebhooksClient(basicAuthUserName, basicAuthPassword);\n\n            IWebhooksController webhooks = client.Webhooks;\n\n            Guid webhookId = \"WEBHOOK_ID\";\n\n            webhooks.DeleteWebhook(webhookId);\n        }\n    }\n}\n\n\n```\n\n## :closed_book: API Reference Documentation\nCheck out the [full API documentation](https://developers.messagemedia.com/code/webhooks-api-documentation/) for more detailed information.\n\n## :confused: Need help?\nPlease contact developer support at developers@messagemedia.com or check out the developer portal at [developers.messagemedia.com](https://developers.messagemedia.com/)\n\n## :page_with_curl: License\nApache License. See the [LICENSE](LICENSE) file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmessagemedia%2Fwebhooks-csharp-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmessagemedia%2Fwebhooks-csharp-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmessagemedia%2Fwebhooks-csharp-sdk/lists"}