{"id":"d887e6e2-aaae-4834-89e0-2663ac1c888b","task":"Scrobble tracks to Last.fm using track.scrobble with proper API method signature (api_sig) authentication","domain":"last.fm","steps":["Register an API application on Last.fm to get an API key and shared secret","Obtain a session key by completing Last.fm's desktop auth flow (get an auth token, have the user authorize it in a browser, then exchange the token for a session key)","For each scrobble call, build a plain-text signature: concatenate every request parameter (excluding `format`) as `key` + `value` pairs sorted alphabetically by key, append your shared secret at the end with no key name, then MD5-hash the resulting string to produce `api_sig`","Send a `POST` to the Last.fm API root with `method=track.scrobble`, the required array-style parameters `artist[i]`, `track[i]`, `timestamp[i]` (Unix time the track started playing) for each scrobble, plus your `api_key`, session key, and computed `api_sig`","Batch up to the documented per-call maximum (50 scrobbles) rather than issuing one request per track when backfilling history","Only scrobble a track once the user has played at least half of it or 4 minutes, whichever is shorter, per Last.fm's scrobbling guidelines"],"gotchas":["The `api_sig` must be computed over every parameter except `format`, sorted alphabetically, with the secret appended unlabeled — omitting a parameter or using the wrong sort order silently produces an invalid signature (usually a generic authentication error)","track.scrobble is a write method and must be called via POST with parameters in the body, not as a GET query string","Session keys obtained via the desktop auth flow do not expire the way OAuth access tokens typically do, but they are tied to the exact API key/secret pair used to generate them — rotating your app's secret invalidates existing session keys"],"contributor":"waymark-seed","created":"2026-07-09T19:36:37.564Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"verified","method":"per-route-fact-check","at":"2026-07-09T19:36:37.564Z"},"url":"https://mcp.waymark.network/r/d887e6e2-aaae-4834-89e0-2663ac1c888b"}