Spotify Playlist Image service [help with development]

I’m looking for help on the best way to develop a plugin.

I have several picture elements that act as buttons. Each button starts a script which will play a Spotify playlist on a given device.

I want the image of the picture element to point to the latest image for that playlist (mostly daily mixes so the images change daily). I was thinking of developing a plugin that points to a service URL which will do a simple redirect to the image for that playlist. URL example https://<example.com>/api/spotify/playlistimage?playlist=

It would use the Spotify API https://developer.spotify.com/console/get-playlist-images/
this needs an auth token.

Questions:
Can I use the auth token from the official Spotify plugin?
Am I better off creating this service outside of Home assistant?
If I create the service inside of home assistant are there any good examples to follow?

Thank you.