{"id":37046817,"url":"https://github.com/ding-live/ding-csharp","last_synced_at":"2026-01-14T05:31:17.586Z","repository":{"id":207401215,"uuid":"716214613","full_name":"ding-live/ding-csharp","owner":"ding-live","description":"Ding's C# SDK","archived":false,"fork":false,"pushed_at":"2025-01-09T00:21:55.000Z","size":463,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-23T09:44:03.902Z","etag":null,"topics":["ding","ding-sdk"],"latest_commit_sha":null,"homepage":"https://docs.ding.live","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ding-live.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2023-11-08T17:08:38.000Z","updated_at":"2025-01-09T00:21:55.000Z","dependencies_parsed_at":"2023-12-12T01:28:16.961Z","dependency_job_id":"230ab7fa-42b5-47d0-aeae-e701a90a61bf","html_url":"https://github.com/ding-live/ding-csharp","commit_stats":null,"previous_names":["ding-live/ding-csharp"],"tags_count":103,"template":false,"template_full_name":null,"purl":"pkg:github/ding-live/ding-csharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ding-live%2Fding-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ding-live%2Fding-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ding-live%2Fding-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ding-live%2Fding-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ding-live","download_url":"https://codeload.github.com/ding-live/ding-csharp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ding-live%2Fding-csharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28410594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ding","ding-sdk"],"created_at":"2026-01-14T05:31:16.887Z","updated_at":"2026-01-14T05:31:17.580Z","avatar_url":"https://github.com/ding-live.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ding C# SDK\n\nThe Ding C# library provides convenient access to the Ding API from applications written in C#.\n\n\u003c!-- Start Summary [summary] --\u003e\n## Summary\n\nDing: The OTP API allows you to send authentication codes to your users using their phone numbers.\n\u003c!-- End Summary [summary] --\u003e\n\n\u003c!-- Start Table of Contents [toc] --\u003e\n## Table of Contents\n\u003c!-- $toc-max-depth=2 --\u003e\n* [Ding C# SDK](#ding-c-sdk)\n  * [SDK Installation](#sdk-installation)\n  * [SDK Example Usage](#sdk-example-usage)\n  * [SDK Example Usage](#sdk-example-usage-1)\n  * [Available Resources and Operations](#available-resources-and-operations)\n  * [Server Selection](#server-selection)\n  * [Authentication](#authentication)\n  * [Error Handling](#error-handling)\n* [Development](#development)\n  * [Maturity](#maturity)\n  * [Contributions](#contributions)\n\n\u003c!-- End Table of Contents [toc] --\u003e\n\n\u003c!-- Start SDK Installation [installation] --\u003e\n## SDK Installation\n\n### NuGet\n\nTo add the [NuGet](https://www.nuget.org/) package to a .NET project:\n```bash\ndotnet add package DingSDK\n```\n\n### Locally\n\nTo add a reference to a local instance of the SDK in a .NET project:\n```bash\ndotnet add reference DingSDK/DingSDK.csproj\n```\n\u003c!-- End SDK Installation [installation] --\u003e\n\n## SDK Example Usage\n\n\u003c!-- Start SDK Example Usage [usage] --\u003e\n## SDK Example Usage\n\n### Send a code\n\nSend an OTP code to a user's phone number.\n\n\n```csharp\nusing DingSDK;\nusing DingSDK.Models.Components;\n\nvar sdk = new Ding(security: new Security() {\n    APIKey = \"YOUR_API_KEY\",\n});\n\nCreateAuthenticationRequest req = new CreateAuthenticationRequest() {\n    CustomerUuid = \"cf2edc1c-7fc6-48fb-86da-b7508c6b7b71\",\n    Locale = \"fr-FR\",\n    PhoneNumber = \"+1234567890\",\n};\n\nvar res = await sdk.Otp.CreateAuthenticationAsync(req);\n\n// handle response\n```\n\n### Check a code\n\nCheck that a code entered by a user is valid.\n\n\n```csharp\nusing DingSDK;\nusing DingSDK.Models.Components;\n\nvar sdk = new Ding(security: new Security() {\n    APIKey = \"YOUR_API_KEY\",\n});\n\nCreateCheckRequest req = new CreateCheckRequest() {\n    AuthenticationUuid = \"eebe792b-2fcc-44a0-87f1-650e79259e02\",\n    CheckCode = \"123456\",\n    CustomerUuid = \"64f66a7c-4b2c-4131-a8ff-d5b954cca05f\",\n};\n\nvar res = await sdk.Otp.CheckAsync(req);\n\n// handle response\n```\n\n### Perform a retry\n\nPerform a retry if a user has not received the code.\n\n\n```csharp\nusing DingSDK;\nusing DingSDK.Models.Components;\n\nvar sdk = new Ding(security: new Security() {\n    APIKey = \"YOUR_API_KEY\",\n});\n\nRetryAuthenticationRequest req = new RetryAuthenticationRequest() {\n    AuthenticationUuid = \"a4e4548a-1f7b-451a-81cb-a68ed5aff3b0\",\n    CustomerUuid = \"28532118-1b33-420a-b57b-648c9bf85fee\",\n};\n\nvar res = await sdk.Otp.RetryAsync(req);\n\n// handle response\n```\n\n### Send feedback\n\nSend feedback about the authentication process.\n\n\n```csharp\nusing DingSDK;\nusing DingSDK.Models.Components;\n\nvar sdk = new Ding(security: new Security() {\n    APIKey = \"YOUR_API_KEY\",\n});\n\nFeedbackRequest req = new FeedbackRequest() {\n    CustomerUuid = \"cc0f6c04-40de-448f-8301-3cb0e6565dff\",\n    PhoneNumber = \"+1234567890\",\n    Status = FeedbackRequestStatus.Onboarded,\n};\n\nvar res = await sdk.Otp.FeedbackAsync(req);\n\n// handle response\n```\n\n### Get authentication status\n\nGet the status of an authentication.\n\n\n```csharp\nusing DingSDK;\nusing DingSDK.Models.Components;\n\nvar sdk = new Ding(security: new Security() {\n    APIKey = \"YOUR_API_KEY\",\n});\n\nvar res = await sdk.Otp.GetAuthenticationStatusAsync(authUuid: \"d8446450-f2fa-4dd9-806b-df5b8c661f23\");\n\n// handle response\n```\n\n### Look up for phone number\n\nPerform a phone number lookup.\n\n\n```csharp\nusing DingSDK;\nusing DingSDK.Models.Components;\nusing DingSDK.Models.Requests;\nusing System.Collections.Generic;\n\nvar sdk = new Ding(security: new Security() {\n    APIKey = \"YOUR_API_KEY\",\n});\n\nvar res = await sdk.Lookup.LookupAsync(\n    customerUuid: \"69a197d9-356c-45d1-a807-41874e16b555\",\n    phoneNumber: \"\u003cvalue\u003e\",\n    type: new List\u003cDingSDK.Models.Requests.Type\u003e() {\n        DingSDK.Models.Requests.Type.Cnam,\n    }\n);\n\n// handle response\n```\n\u003c!-- End SDK Example Usage [usage] --\u003e\n\n\u003c!-- Start Available Resources and Operations [operations] --\u003e\n## Available Resources and Operations\n\n\u003cdetails open\u003e\n\u003csummary\u003eAvailable methods\u003c/summary\u003e\n\n\n### [Lookup](docs/sdks/lookup/README.md)\n\n* [Lookup](docs/sdks/lookup/README.md#lookup) - Look up for phone number\n\n### [Otp](docs/sdks/otp/README.md)\n\n* [Check](docs/sdks/otp/README.md#check) - Check a code\n* [CreateAuthentication](docs/sdks/otp/README.md#createauthentication) - Send a code\n* [Feedback](docs/sdks/otp/README.md#feedback) - Send feedback\n* [GetAuthenticationStatus](docs/sdks/otp/README.md#getauthenticationstatus) - Get authentication status\n* [Retry](docs/sdks/otp/README.md#retry) - Perform a retry\n\n\u003c/details\u003e\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\u003c!-- Start Server Selection [server] --\u003e\n## Server Selection\n\n### Override Server URL Per-Client\n\nThe default server can also be overridden globally by passing a URL to the `serverUrl: string` optional parameter when initializing the SDK client instance. For example:\n```csharp\nusing DingSDK;\nusing DingSDK.Models.Components;\n\nvar sdk = new Ding(\n    serverUrl: \"https://api.ding.live/v1\",\n    security: new Security() {\n        APIKey = \"YOUR_API_KEY\",\n    }\n);\n\nCreateCheckRequest req = new CreateCheckRequest() {\n    AuthenticationUuid = \"eebe792b-2fcc-44a0-87f1-650e79259e02\",\n    CheckCode = \"123456\",\n    CustomerUuid = \"64f66a7c-4b2c-4131-a8ff-d5b954cca05f\",\n};\n\nvar res = await sdk.Otp.CheckAsync(req);\n\n// handle response\n```\n\u003c!-- End Server Selection [server] --\u003e\n\n\u003c!-- Start Authentication [security] --\u003e\n## Authentication\n\n### Per-Client Security Schemes\n\nThis SDK supports the following security scheme globally:\n\n| Name     | Type   | Scheme  |\n| -------- | ------ | ------- |\n| `APIKey` | apiKey | API key |\n\nYou can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:\n```csharp\nusing DingSDK;\nusing DingSDK.Models.Components;\n\nvar sdk = new Ding(security: new Security() {\n    APIKey = \"YOUR_API_KEY\",\n});\n\nCreateCheckRequest req = new CreateCheckRequest() {\n    AuthenticationUuid = \"eebe792b-2fcc-44a0-87f1-650e79259e02\",\n    CheckCode = \"123456\",\n    CustomerUuid = \"64f66a7c-4b2c-4131-a8ff-d5b954cca05f\",\n};\n\nvar res = await sdk.Otp.CheckAsync(req);\n\n// handle response\n```\n\u003c!-- End Authentication [security] --\u003e\n\n\u003c!-- Start Error Handling [errors] --\u003e\n## Error Handling\n\nHandling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.\n\nBy default, an API error will raise a `DingSDK.Models.Errors.SDKException` exception, which has the following properties:\n\n| Property      | Type                  | Description           |\n|---------------|-----------------------|-----------------------|\n| `Message`     | *string*              | The error message     |\n| `StatusCode`  | *int*                 | The HTTP status code  |\n| `RawResponse` | *HttpResponseMessage* | The raw HTTP response |\n| `Body`        | *string*              | The response content  |\n\nWhen custom error responses are specified for an operation, the SDK may also throw their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `CheckAsync` method throws the following exceptions:\n\n| Error Type                          | Status Code | Content Type     |\n| ----------------------------------- | ----------- | ---------------- |\n| DingSDK.Models.Errors.ErrorResponse | 400         | application/json |\n| DingSDK.Models.Errors.SDKException  | 4XX, 5XX    | \\*/\\*            |\n\n### Example\n\n```csharp\nusing DingSDK;\nusing DingSDK.Models.Components;\nusing DingSDK.Models.Errors;\n\nvar sdk = new Ding(security: new Security() {\n    APIKey = \"YOUR_API_KEY\",\n});\n\ntry\n{\n    CreateCheckRequest req = new CreateCheckRequest() {\n        AuthenticationUuid = \"eebe792b-2fcc-44a0-87f1-650e79259e02\",\n        CheckCode = \"123456\",\n        CustomerUuid = \"64f66a7c-4b2c-4131-a8ff-d5b954cca05f\",\n    };\n\n    var res = await sdk.Otp.CheckAsync(req);\n\n    // handle response\n}\ncatch (Exception ex)\n{\n    if (ex is ErrorResponse)\n    {\n        // Handle exception data\n        throw;\n    }\n    else if (ex is DingSDK.Models.Errors.SDKException)\n    {\n        // Handle default exception\n        throw;\n    }\n}\n```\n\u003c!-- End Error Handling [errors] --\u003e\n\n\u003c!-- Placeholder for Future Speakeasy SDK Sections --\u003e\n\n# Development\n\n## Maturity\n\nThis SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage\nto a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally\nlooking for the latest version.\n\n## Contributions\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically.\nFeel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fding-live%2Fding-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fding-live%2Fding-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fding-live%2Fding-csharp/lists"}