fusion icon indicating copy to clipboard operation
fusion copied to clipboard

Integration for fetching user music listening history

Open oreHGA opened this issue 2 years ago • 2 comments
trafficstars

We already have a flow to:

We should integrate an OAuth flow to the spotify api that allows us to fetch listening history for a user periodically and update:

  • [ ] on the settings page, user connects account
  • [ ] client sends token to the backend server to store in keystore
  • [ ] adds a controller endpoint to periodically fetch from spotify on behalf of user
  • [ ] call the upload api to store data for user

https://github.com/dgendill/spotify-play-history has a good javascript example for connecting to spoify api and fetching periodically.

Data should be stored in remote blob (if user consents) - <userGuid>/y/m/d/<unixTimestamp>-listening_history.json

oreHGA avatar Jan 25 '23 19:01 oreHGA

https://developer.spotify.com/documentation/web-api/reference/get-recently-played

oreHGA avatar Apr 02 '23 11:04 oreHGA

Fell off the wagon here but I'm back now, I'll make a PR later tonight with the backend pieces for this : https://developer.spotify.com/documentation/web-api/tutorials/code-flow

oreHGA avatar May 03 '23 01:05 oreHGA