This is an example of how to get do three-legged OAuth to get user tokens for the Tumblr API.
You can use this as a starting point for when you're trying to build some super cool app using tumblr.js.
-
Register a Tumblr OAuth app
-
Create a
credentials.json
file with theconsumer_key
andconsumer_secret
for your OAuth app. -
Run the little express server included to get you started
npm start
-
Hit the authorize URL on the local server, which is will be http://localhost:3000/authorize by default
-
Log in with your Tumblr account and click "Allow"
-
Voila! You now have user tokens that you can use to make authenticated requests against the Tumblr API.
Take a look at lib/app.js
! There are some comments explaining roughly how /authorize
and /callback
work together to get the credentials you need to make fully authenticated requests to the Tumblr API.