public string Post([FromBody] string username) { if (username.IsEmpty()) { return "Missing Username"; } var user = UserManager.Get(username); if (user == null) { return "Wrong username"; } else { return user.Entity.ApiKey; } }