tenderlove / imgur2

Quick hack for uploading to imgur
13 stars 3 forks source link

Imgur's API has changed #1

Open KendallPark opened 8 years ago

KendallPark commented 8 years ago

Sometime in the past few weeks, imgur2 started displaying this error:

imgur2.rb:24:in `run': undefined method `[]' for nil:NilClass (NoMethodError)

I did some digging and found this:

"data"=>
  {"error"=>"The version of the Imgur API you are using is no longer available",
   "request"=>"/2/upload.json",
   "method"=>"POST"},
 "success"=>false,
 "status"=>404}

Looks like V2 of Imgur's API is gone.

This version of the API, version 3, uses OAuth 2.0. This means that all requests will need to be encrypted and sent via SSL/TLS to https://. It also means that you need to register your application, even if you aren't allowing users to login.

Not exactly sure what this means for future of the imgur2 gem.

tenderlove commented 8 years ago

Ya, I've run in to this too. I guess we need to integrate oauth2, but I'm dreading doing that. It's annoying that you can anonymously upload images from the website, but you have to use oauth2 to post from a simple command line tool.

Anyway, I'll poke at adding oauth2 I guess.