public ActionResult Login(string code) { spotifyService.ITestService service = new spotifyService.TestServiceClient(); spotifyService.AuthToken auth = service.Login(clientId, clientSecret, redirestUri, code, (string)Session["RefreshToken"]); Session["Token"] = auth.AccessToken; Session["TokenType"] = auth.TokenType; if (auth.RefreshToken != null) { Session["RefreshToken"] = auth.RefreshToken; } List <spotifyService.Category> categories = new List <spotifyService.Category>(); categories = service.GetAllCategories(clientId, clientSecret, redirestUri, (string)Session["Token"], (string)Session["TokenType"]).ToList(); ViewBag.Categories = categories; return(View("/Views/Category/Search.cshtml")); }