public async Task <IActionResult> OnGetRetrieveChatApiUrlAsync() { var identityInfo = _configuration.GetSection("IdentityInfo"); var chatApiUrl = _configuration.GetSection("ChatpApiUrl").Value; var basicTokenRequest = new BasicTokenRequest { ClientId = identityInfo.GetSection("ClientId").Value, ClientSecret = identityInfo.GetSection("ClientSecret").Value, Address = identityInfo.GetSection("Address").Value, Scope = identityInfo.GetSection("Scope").Value }; var accessToken = await _identityManagerService.GetAccessToken(basicTokenRequest); return(new JsonResult($"{chatApiUrl}?token={accessToken}")); }