(Otp)
Send OTP codes to your users using their phone numbers.
- Check - Check a code
- CreateAuthentication - Send a code
- Feedback - Send feedback
- GetAuthenticationStatus - Get authentication status
- Retry - Perform a retry
Check a code
using DingSDK;
using DingSDK.Models.Components;
var sdk = new Ding(security: new Security() {
APIKey = "YOUR_API_KEY",
});
CreateCheckRequest req = new CreateCheckRequest() {
AuthenticationUuid = "eebe792b-2fcc-44a0-87f1-650e79259e02",
CheckCode = "123456",
CustomerUuid = "64f66a7c-4b2c-4131-a8ff-d5b954cca05f",
};
var res = await sdk.Otp.CheckAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
CreateCheckRequest | ✔️ | The request object to use for the request. |
Error Type | Status Code | Content Type |
---|---|---|
DingSDK.Models.Errors.ErrorResponse | 400 | application/json |
DingSDK.Models.Errors.SDKException | 4XX, 5XX | */* |
Send a code
using DingSDK;
using DingSDK.Models.Components;
var sdk = new Ding(security: new Security() {
APIKey = "YOUR_API_KEY",
});
CreateAuthenticationRequest req = new CreateAuthenticationRequest() {
CustomerUuid = "cf2edc1c-7fc6-48fb-86da-b7508c6b7b71",
Locale = "fr-FR",
PhoneNumber = "+1234567890",
};
var res = await sdk.Otp.CreateAuthenticationAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
CreateAuthenticationRequest | ✔️ | The request object to use for the request. |
Models.Requests.CreateAuthenticationResponse
Error Type | Status Code | Content Type |
---|---|---|
DingSDK.Models.Errors.ErrorResponse | 400 | application/json |
DingSDK.Models.Errors.SDKException | 4XX, 5XX | */* |
Send feedback
using DingSDK;
using DingSDK.Models.Components;
var sdk = new Ding(security: new Security() {
APIKey = "YOUR_API_KEY",
});
FeedbackRequest req = new FeedbackRequest() {
CustomerUuid = "cc0f6c04-40de-448f-8301-3cb0e6565dff",
PhoneNumber = "+1234567890",
Status = DingSDK.Models.Components.FeedbackRequestStatus.Onboarded,
};
var res = await sdk.Otp.FeedbackAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
FeedbackRequest | ✔️ | The request object to use for the request. |
Models.Requests.FeedbackResponse
Error Type | Status Code | Content Type |
---|---|---|
DingSDK.Models.Errors.ErrorResponse | 400 | application/json |
DingSDK.Models.Errors.SDKException | 4XX, 5XX | */* |
Get authentication status
using DingSDK;
using DingSDK.Models.Requests;
using DingSDK.Models.Components;
var sdk = new Ding(security: new Security() {
APIKey = "YOUR_API_KEY",
});
var res = await sdk.Otp.GetAuthenticationStatusAsync(authUuid: "d8446450-f2fa-4dd9-806b-df5b8c661f23");
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
AuthUuid |
string | ✔️ | N/A |
GetAuthenticationStatusResponse
Error Type | Status Code | Content Type |
---|---|---|
DingSDK.Models.Errors.ErrorResponse | 400 | application/json |
DingSDK.Models.Errors.SDKException | 4XX, 5XX | */* |
Perform a retry
using DingSDK;
using DingSDK.Models.Components;
var sdk = new Ding(security: new Security() {
APIKey = "YOUR_API_KEY",
});
RetryAuthenticationRequest req = new RetryAuthenticationRequest() {
AuthenticationUuid = "a4e4548a-1f7b-451a-81cb-a68ed5aff3b0",
CustomerUuid = "28532118-1b33-420a-b57b-648c9bf85fee",
};
var res = await sdk.Otp.RetryAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
RetryAuthenticationRequest | ✔️ | The request object to use for the request. |
Error Type | Status Code | Content Type |
---|---|---|
DingSDK.Models.Errors.ErrorResponse | 400 | application/json |
DingSDK.Models.Errors.SDKException | 4XX, 5XX | */* |