public HttpResponseMessage SendOtpOnMobile([FromBody]OtpOnMobileAPIRequest objOtpOnMobileAPIRequest) { otpValue = CommonUtility.GenerateRandomOTP(4); HttpContext.Current.Session["otpGeneratedValue"] = otpValue; //Send OTP logic and response code .... } public HttpResponseMessage ValidateOtpFromMobile([FromBody]ValidateOtpFromMobileAPIRequest objValidateOtpFromMobileAPIRequest) { var otpGeneratedValue = HttpContext.Current.Session["otpGeneratedValue"]; if(objValidateOtpFromMobileAPIRequest.OTP == otpGeneratedValue) { //success } .... }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)