-
v2.0.0 Stable
released this
2026-01-25 21:17:47 +03:00 | 0 commits to main since this release📅 Originally published on GitHub: Sun, 25 Jan 2026 18:22:34 GMT
🏷️ Git tag created: Sun, 25 Jan 2026 18:17:47 GMTv2.0.0 - No Authentication Required 🎉
This is a major release that completely redesigns the package to work without any authentication tokens.
✨ What's New
Zero Authentication
The package now scrapes Spotify's public web pages to extract embedded data. No more dealing with access tokens, client tokens, or OAuth flows!
// Before (v1.x) - Required tokens client := spotify.NewClient( spotify.WithAccessToken("..."), spotify.WithClientToken("..."), ) // Now (v2.0) - Just works! client := spotify.NewClient() track, _ := client.FetchTrack(ctx, "4cOdK2wGLETKBW3PvgPWqT")Browser-Like TLS Fingerprinting
Uses CycleTLS to mimic real browser requests, bypassing Spotify's bot detection.
💥 Breaking Changes
Removed Features
- Search functionality -
Search(),SearchWithOptions(),SearchTopResult()removed (not available via HTML scraping) - Authentication system -
auth/package removed entirely - Token options -
WithAccessToken(),WithClientToken(),WithTokenPersistence(),WithAuthManager()removed - Auth errors -
ErrTokenExpired,ErrTokenNotFound,ErrRequestCanceled,AuthError,IsAuthError()removed
Go Version Requirement
- Minimum Go version is now 1.24 (required by CycleTLS dependency)
Simplified Error Types
APIErrorno longer wraps errors (removedUnwrap()method)WrapAPIError()function removedNewAuthError()function removed
📦 What's Included
Feature Status Track info (name, duration, album, artists) ✅ Artist info (name, followers, monthly listeners, bio) ✅ Album info (name, artists, track list, artwork) ✅ Cover art URLs ✅ Play counts ⚠️ Limited (often empty in HTML) Search ❌ Removed 🚀 Migration Guide
1. Update Go version
# go.mod go 1.242. Remove authentication code
// Delete these imports // "github.com/FrostBreker/spotify-private-api/auth" // Delete token-related options client := spotify.NewClient( // spotify.WithAccessToken("..."), // Remove // spotify.WithClientToken("..."), // Remove // spotify.WithTokenPersistence("..."), // Remove spotify.WithDebug(true), // Keep if needed )3. Remove search code
// These functions no longer exist: // client.Search(ctx, "query") // client.SearchWithOptions(ctx, "query", opts) // client.SearchTopResult(ctx, "query")4. Update error handling
// Before if errors.IsAuthError(err) { ... } if err == errors.ErrTokenExpired { ... } // After - just remove these checks if errors.IsAPIError(err) { ... } if errors.IsParseError(err) { ... }📋 Full Changelog
Added
- CycleTLS integration for browser-like TLS fingerprinting
- HTML scraping to extract embedded
initialStatedata - Automatic data extraction without authentication
Removed
search.go,search_test.go- Search functionalitymodels/search.go- Search response typesauth/package - Token management (cache, persistence, manager)cmd/directory - Debug utilitiesdocs/directory - Reference documentation- Authentication-related client options
- Authentication-related error types
Changed
- Minimum Go version: 1.21 → 1.24
- HTTP client: standard
net/http→ CycleTLSBrowserClient - Data source: Spotify GraphQL API → HTML page scraping
APIErrorsimplified (no longer wraps errors)
Fixed
- Bot detection issues (TLS fingerprinting now mimics Chrome)
📊 Dependencies
github.com/Danny-Dasilva/CycleTLS/cycletls v1.0.30🙏 Acknowledgments
Thanks to CycleTLS for making browser-like requests possible in Go.
Full Changelog: https://github.com/FrostBreker/spotify-private-api/compare/v1.0.0...v2.0.0
Full Changelog: https://github.com/FrostBreker/spotify-private-api/compare/v1.0.9...v2.0.0
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- Search functionality -
mirror of
https://github.com/FrostBreker/spotify-private-api.git
synced 2026-04-27 06:26:00 +03:00