drone29a / clj-oauth

OAuth Consumer support for Clojure
BSD 2-Clause "Simplified" License
273 stars 52 forks source link

401 on access-token call to twitter #38

Closed bhurlow closed 10 years ago

bhurlow commented 10 years ago

Hi There,

ran into some snags using this module to access twitter api. I'm able to create a consumer and fetch an access token.

Also can successfully generate an approval uri and callback.

When I try to exchange for an access token e.g:

(def access-token-response (oauth/access-token consumer token verifier))

I get a 401 every time.

I'm sure my api key and secret are correct, my app is enabled for sign in and I do get both token and verifier in callback.

Any thoughts on this? Has anyone experienced partial access problems with twitter api?

Thanks!

bhurlow commented 10 years ago

Oops, figured out my mistake. I wasn't passing the whole request-token map into the access-token fn https://github.com/mattrepl/clj-oauth/blob/master/src/oauth/client.clj#L134

user error!

drone29a commented 10 years ago

Glad you figured it out! Take care.

bhurlow commented 10 years ago

@mattrepl thanks! good work on this one