SDK reference
Mirage Last.fm
GET/
Your linked Last.fm account (account: username, profile link, verified, when linked, visibility, showActivity, problem), or null, and which ways of linking work here (available.signIn, available.username).
curl 'https://api.cactive.com.au/v1/messaging/me/lastfm' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Starts linking your Last.fm account: url is Last.fm's approval page, which sends you back to the Mirage app with a token (a one-time state, good for 10 minutes). app: the phone app's id, whose return page hands the token to the app.
curl -X POST 'https://api.cactive.com.au/v1/messaging/me/lastfm' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Finishes linking with what Last.fm sent back (state, token), for the person who started: the token becomes a session key (auth.getSession), kept sealed. A Last.fm account links to one person; this replaces anyone else's unverified link to it.
curl -X POST 'https://api.cactive.com.au/v1/messaging/me/lastfm/callback' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PUT/
Links a Last.fm account by username alone (no sign-in): only public listening shows, and the link is unverified.
curl -X PUT 'https://api.cactive.com.au/v1/messaging/me/lastfm/username' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Who sees your Last.fm activity and profile section (visibility: everyone, friends or me), and whether your listening shows as your activity (showActivity).
curl -X PATCH 'https://api.cactive.com.au/v1/messaging/me/lastfm' \
-H "Authorization: Bearer $CACTIVE_TOKEN"DELETE/
Unlinks your Last.fm account and deletes its session key.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/messaging/me/lastfm' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
What each of userIds (up to 500) is listening to, for those whose activity you may see (activities: userId, activity with track, artist, album, album art copied into Mirage's files, the track's link, nowPlaying, playedAt); others are left out.
curl -X POST 'https://api.cactive.com.au/v1/messaging/activities' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Someone's listening on their profile, when you may see it: this week's top artists (topArtists: up to ten, most played first, each with name, url and pictureUrl, a copy of the artist's picture or null) and their activity. Never their Last.fm username or play counts.
curl 'https://api.cactive.com.au/v1/messaging/users/{userId}/lastfm' \
-H "Authorization: Bearer $CACTIVE_TOKEN"