public void spotifyConnect() { SpotifyController spotifyController = new SpotifyController(); ContentResult result = spotifyController.GetSpot(); tempVar = HttpContext.Request.GetEncodedUrl().ToString().Split("=")[1]; ContentResult someThing = spotifyController.Get(tempVar); tempVar = someThing.Content.ToString(); if (tempVar != null) { dynamic stuff1 = Newtonsoft.Json.JsonConvert.DeserializeObject(tempVar); string thisText = stuff1.access_token; tempVar = thisText; } _spotify = new SpotifyWebAPI() { AccessToken = tempVar, TokenType = "Bearer" }; }