public async Task <IActionResult> CallbackAsync(string code) { if (string.IsNullOrEmpty(code)) { return(BadRequest(new { message = "Url param 'code' not provided" })); } bool result = await _httpRequestService.DoExchangeAsync(code); if (!result) { return(BadRequest(new { message = "Error trying to exchange code" })); } return(Ok(new { message = "OK" })); }