At least the TOKEN command was perfect for me, thank you! Instead of passing ID and SECRET, I wrote the values from the Spotify Developer Dashboard to a file like so:
$ touch .spotify_credentials && chmod 600 .spotify_credentials
then edited .spotify_credentials with client_id:client_secret, then
$ curl --basic --user "$(cat .spotify_credentials)" -X POST -d grant_type=client_credentials https://accounts.spotify.com/api/token
which was successful