Last.fm Provider
The Last.fm provider enables syncing your complete scrobble history with Spotter.
Features
- Unlimited historical data: Access your full scrobbling history
- No expiration: API keys don't expire
- Community metadata: Access to tags, biographies, and more
- MD5 signature-based authentication: Straightforward authentication flow
Why Last.fm?
Unlike Spotify's 50-track limit, Last.fm provides access to your entire scrobble history. This makes it the recommended choice for comprehensive listening history tracking.
Setup
1. Create Last.fm Application
- Go to Last.fm API Account Creation
- Log in with your Last.fm account
- Fill in the application form:
- Application name: Spotter
- Application description: Personal music tracking app
- Application homepage: (optional)
- Callback URL:
http://localhost:8080/auth/lastfm/callback
- Click Submit
- Copy the API Key and Shared Secret
2. Configure Spotter
Add to your .env file:
SPOTTER_LASTFM_API_KEY=your_api_key_here
SPOTTER_LASTFM_SHARED_SECRET=your_shared_secret_here
SPOTTER_LASTFM_REDIRECT_URL=http://localhost:8080/auth/lastfm/callback
3. Connect Account
- Open Spotter and go to Preferences > Services
- Click Connect Last.fm
- Authorize Spotter on Last.fm
- You'll be redirected back to Spotter
Configuration
| Variable | Description | Required |
|---|---|---|
SPOTTER_LASTFM_API_KEY | Last.fm API Key | Yes |
SPOTTER_LASTFM_SHARED_SECRET | Last.fm Shared Secret | Yes |
SPOTTER_LASTFM_REDIRECT_URL | OAuth callback URL | Yes |
Synced Data
Listening History
- Full scrobble history (all time)
- Play timestamps
- Track metadata
Additional Data
- Artist tags
- Album information
- Track tags
Authentication
Last.fm uses MD5 signature-based authentication:
- User authorizes via web interface
- Spotter receives a session token
- Session tokens don't expire
- All API calls are signed with your shared secret
Scrobbling to Last.fm
To send your Navidrome plays to Last.fm, consider using multi-scrobbler:
# Example multi-scrobbler configuration
sources:
- name: navidrome
type: subsonic
url: http://navidrome:4533
user: your_username
password: your_password
targets:
- name: lastfm
type: lastfm
apiKey: your_lastfm_api_key
secret: your_lastfm_secret
This ensures all your plays are recorded in Last.fm and then synced to Spotter.
Rate Limiting
Last.fm has generous rate limits:
- No strict per-second limits for most endpoints
- Recommended: Space requests by at least 200ms
- Bulk imports may need throttling
Troubleshooting
"Invalid API key"
- Verify the API key is copied correctly (no extra spaces)
- Check that the key is active on Last.fm
- Try generating a new API key
"Invalid session"
Sessions can become invalid if:
- You revoked access in Last.fm settings
- There was an authentication error
To fix:
- Disconnect Last.fm from Preferences
- Reconnect your account
Missing Scrobbles
- Verify scrobbles appear in your Last.fm profile
- Check the sync interval setting
- Trigger a manual sync from Tasks
Historical Data Import
On first connection, Spotter imports your full scrobble history. This may take time for large histories:
- 10,000 scrobbles: ~2-3 minutes
- 100,000 scrobbles: ~20-30 minutes
- Progress is shown in the UI
Production Deployment
For production:
- Update
SPOTTER_LASTFM_REDIRECT_URLto your production domain - Ensure HTTPS is configured
- Update the callback URL in your Last.fm app settings