sferik / twitter-ruby

A Ruby interface to the Twitter API.
http://www.rubydoc.info/gems/twitter
MIT License
4.58k stars 1.31k forks source link

Twitter::Error::Forbidden: Your credentials do not allow access to this resource with oauth_token_secret #917

Closed hkmaly closed 1 year ago

hkmaly commented 6 years ago

When authenticating like

Twitter::REST::Client.new(
    :consumer_key => CONSUMER_KEY,
    :consumer_secret => CONSUMER_SECRET,
    :oauth_token => oauth_token,
    :oauth_token_secret => oauth_token_secret)

I'm getting the error message "Twitter::Error::Forbidden: Your credentials do not allow access to this resource".

Obviously, the oauth_token and oauth_token_secret are deprecated (in 5.17 which I'm using), but it would be nice if the library would tell that. There is some deprecate_alias method which seems to be related but doesn't help in this case (I guess it would help if I would be using block).

(For people finding this error: the new names of those are access_token and access_token_secret)