Search code examples
rubyapioauthtumblr

how to get the base-hostename (blog name) with tumblr api after a successfull oauth-authorization


I have a tumblr api-application and i need to receive infos about a specific blog. To get this information I need the following request:

api.tumblr.com/v2/blog/{base-hostname}/info?api_key={key}

But I don't know how i get the {base-hostname} from the user who is logged in. Oauth provides just the conusmer-key, the consumer-secret, theo auth-token, and the oauth-token-secret. But i need the blog-name which matches with the user credentials. It works perfectly fine with the tumblr_client gem but due to some reason I am not allowed to use ist. Can anybody help me with that?


Solution

  • I think you can parse the response from /user/info api (which is based on oauth creds provided for the request). It returns the name / url for the user's blog(s), which you can then use in your {base-hostname}.