Working with the Spotify-API in Rails
I'm using
- Rails 5.2.1.1
- ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
require 'rspotify'
RSpotify::Track
RSpotify::Track.search('bohemian')
Throws me - > >
RSpotify::MissingAuthentication (RSpotify::MissingAuthentication)
RSpotify.authenticate("<spotify_client_id>", "<spotify_client_secret>")
Throws me - > >
RestClient::BadRequest (400 Bad Request)
My question is, can you help me with the following?
-
How can I consume the spotify API in Ruby on Rails 5.2
-
How credentials are used in rails to consume this API
-
How can I authenticate from rails.
Thank you in advance for the help.