Closed stilist closed 10 years ago
The API is completely broken. OAuth simply doesn’t work (The requested address <strong>'/oauth/authorize.txt'</strong> was not found on this server.
), the app creator/editor is extremely buggy, and the documentation is nearly useless.
The farthest I’ve gotten is:
consumer = OAuth::Consumer.new(ENV["KIVA_APP_KEY"], ENV["KIVA_APP_SECRET"], {
site: "https://api.kivaws.org"
})
request_token = consumer.get_request_token
puts request_token.authorize_url
Will revisit when they get things together.
Based on https://raw.github.com/kiva/omniauth-kiva/master/lib/omniauth/strategies/kiva.rb I’ve advanced to:
@client ||= OAuth::Consumer.new(ENV["KIVA_API_KEY"], ENV["KIVA_API_SECRET"], {
site: "https://api.kivaws.org",
authorize_url: "https://www.kiva.org/oauth/authorize",
request_token_path: "/oauth/request_token",
access_token_path: "/oauth/access_token"
})
Now I get an ‘invalid request’ error, which I think may be due to not giving a callback?
Finally figured this out.
http://build.kiva.org/api