The gem `rspotify` is raising an error

ruby

#1

When I make an authorization request with rspotify, it raises a RestClient::BadRequest: 400 Bad Request error:

RestClient::BadRequest: 400 Bad Request
    from /usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in `return!'
    from /usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-1.8.0/lib/restclient/request.rb:495:in `process_result'
    from /usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in `block in transmit'
    from /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/net/http.rb:853:in `start'
    from /usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in `transmit'
    from /usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute'
    from /usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
    from /usr/local/rvm/gems/ruby-2.3.3/gems/rest-client-1.8.0/lib/restclient.rb:69:in `post'
    from /usr/local/rvm/gems/ruby-2.3.3/gems/rspotify-1.19.1/lib/rspotify/connection.rb:28:in `authenticate'
    from /usr/local/rvm/gems/ruby-2.3.3/gems/irs-1.4.1/lib/ripper.rb:31:in `initialize'
    from (irb):3:in `new'
    from (irb):3
    from /usr/local/rvm/rubies/ruby-2.3.3/bin/irb:11:in `<main>'

Is there any way I can fix this?