public HttpClient GetDefaultClient() { var authHandler = new SpotifyAuthClientCredentialsHttpMessageHandler( ClientId, ClientSecret, new HttpClientHandler()); var client = new HttpClient(authHandler) { BaseAddress = new Uri(BaseUrl) }; var token = authHandler.GetAuthenticationTokenAsync(); return(client); }
public Task <string> GetToken(SpotifyAuthClientCredentialsHttpMessageHandler authHandler) { var token = authHandler.GetAuthenticationTokenAsync(); return(token); }