Reputation: 1
How to setup yt gem
youtube api for rails? I am facing error "Error: invalid_request.Missing required parameter: scope"
. I have already added scope in my program here is a sample code I did.
This is my controller side..
request = Yt::Account.new(scopes: "youtube" ,redirect_uri: "http://localhost:3000/api/v1/users/youtube_callback").authentication_url
This is my yt.rb file initializer:
Yt.configure do |config|
config.log_level = :debug
config.client_id = 'id'
config.client_secret = 'secret'
end
Can anyone site an example how to setup completely yt gem for rails.
I'm using gem 'yt', '~> 0.25.6'
Any idea is highly appreciated, I am a newbie in ruby on rails.
Upvotes: 0
Views: 578
Reputation: 131
the scope needs to be formatted this way ["youtube"]. So change it to:
request = Yt::Account.new(scopes: ["youtube"], redirect_uri: "http://localhost:3000/api/v1/users/youtube_callback").authentication_url
Upvotes: 1