Coda

Last.fm Scrobbling

Automatically track your listening history with Last.fm. Coda scrobbles tracks and updates your now-playing status.

What Is Scrobbling?

Scrobbling sends a record of each track you listen to to Last.fm, building a comprehensive history of your music consumption. Last.fm uses this data to generate recommendations, stats, and social features.

Getting API Credentials

To connect Coda to Last.fm, you need an API key and shared secret:

  1. Go to last.fm/api/account/create.

  2. Fill in the application name (e.g., "Coda") and description. You can leave the callback URL empty.

  3. Submit the form. You'll receive an API Key and Shared Secret.

Keep Credentials Private

Your API key and shared secret are stored locally on your device using the secure enclave. They are never sent to any server other than Last.fm.

Connecting in Coda

  1. Open Settings and tap the Last.fm row.

  2. Enter your API Key and Shared Secret from the previous step.

  3. Tap Get Token — this opens Last.fm in your browser. Authorize the application and copy the returned token.

  4. Paste the token into the Token field in Coda.

  5. Tap Connect. Coda exchanges the token for a session and saves your credentials.

A red dot on the Last.fm row in Settings indicates you're connected. The Player screen shows a Scrobbling indicator below the artist name.

How Scrobbling Works

Coda submits a scrobble to Last.fm when you've listened to a track for at least:

min(240 seconds, track duration / 2)

This means a 3-minute song scrobbles after 90 seconds, while a 10-minute song scrobbles after 4 minutes. This threshold prevents partial listens from polluting your history.

Now Playing

When you start playing a track, Coda immediately sends a "now playing" update to Last.fm. This appears on your Last.fm profile as your currently playing track.

Disconnecting

Open Settings → Last.fm and tap Disconnect. This clears your saved credentials and stops scrobbling. Your Last.fm history is not affected — only future scrobbles stop.

Troubleshooting

  • "Invalid credentials" — Double-check your API key, shared secret, and token. Tokens expire quickly, so request a new one if needed.
  • Scrobbles not appearing — Verify you completed the token authorization step. Check your Last.fm profile to see if scrobbles are being received.
  • Now-playing not updating — Ensure you're connected (red dot in Settings). Try disconnecting and reconnecting.