Skip to content

Authenticating

Alexander Lozada edited this page Sep 14, 2016 · 1 revision

tumblr_client does not provide a way to guide users through the standard OAuth flow (e.g., getting a request token, guiding users to the website to grant permission, and receiving an access token) although this is certainly possible with a custom implementation.

If you would like to use the client without individual user authentication, you can use your own tokens. If you already created an application, you can easily obtain tokens by using Tumblr's API Console.

It is highly recommended that you use environment variables to store sensitive data.

Tumblr.configure do |config|
  config.consumer_key = ENV["CONSUMER_KEY"]
  config.consumer_secret = ENV["CONSUMER_SECRET"]
  config.oauth_token = ENV["ACCESS_TOKEN"]
  config.oauth_token_secret = ENV["ACCESS_TOKEN_SECRET"]
end

Once the Tumblr client is configured, you can begin making requests.

Clone this wiki locally