[xAuth]? App without registration, only for own blogs?

586 views
Skip to first unread message

Amy Adzuki

unread,
Aug 15, 2017, 12:16:43 PM8/15/17
to Tumblr API Discussion
Hello,

Thank you for approving my request to join this discussion group!  I am amy.  I am new to both tumblr and to web programming, but I have a bit of experience with desktop programming in a variety of languages.  I will do my best to follow forum etiquette, but please let me know if I make a mistake somehow and I will correct it PDQ!

I have a few questions.  For cleanliness, I will ask them in separate threads, and for politeness, I will wait a bit between questions.  My first question is as follows (and I have already searched the forum!):

I would like to partially control a couple of my blogs from an external program or script.  Specifically, I would like to be able to write a C program which posts to my blogs via the tumblr API (either version, as I take it that there are two).  I could do this easily with OAuth as explained in the tumblr API docs, but I really do not want to have to register my apps with tumblr -- since the only blog that will be posted to is my own, I would love it if I could just hard-code my e-mail and password into my program!  From browsing the forum, it looks like it is possible to authenticate with an e-mail/password pair by using something called xAuth, which I had never heard of.  Google points me to the X.org manual page, but I doubt that is the same xAuth as described here.  Does the xAuth method still require that I register my app?  If so, is there anything that can be done about this?  If not, could someone please point me to some documentation for the xAuth used by the tumblr API?

If the xAuth method also requires that I register my app with tumblr, does anyone know if it would be possible to use cURL to emulate a browser login?  Specifically, will I start getting capchas if tumblr decides that it is suspicious that I am logging in from a certain UA at the same times of day, 24 hours per day, or simultaneously with another active login?

Thank you for taking the time to read my question, and have a lovely day!
amy ♡

P.S.  For anyone curious, this is what I am trying to achieve:

1.  For my image-based blogs (right now, that would be my anime blog and my cat blog), I will create directories with like-named pairs of: a) image file and b) metadata file with source and some tags.  Then, once per hour (or however long seems appropriate), my program will randomly select a pair from the directory and create an image post with image, source, and tags.  Any other actions on these blogs I will perform manually from my phone.

2.  For my main blogs, I will similarly create directories with text snippets.  The snippets will contain blessings and nice PSAs, such as "Just a reminder to those reading this:  You are a lovely person!" and "If you are considering self-harm or suicide tonight, please do not go through with it!  Here is a list of suicide-prevention hotlines you may call: ...", etc.  Then, a couple of times per day (or however long seems appropriate), my program will randomly select a snippet from the directory and create a textual post with the snippet, and a tag to let people know that I might not be online (maybe something like #autopost).  Any other actions on these blogs I will perform manually from my phone.

Michael Ceyko

unread,
Aug 16, 2017, 11:57:39 AM8/16/17
to Tumblr API Discussion
Hi Amy,

Glad to hear you're interested in using the Tumblr API!

First off, you'll have to use the v2 API - v1 is deprecated and set to read-only mode, so it won't work for your purposes. You can find the API v2 documentation at https://api.tumblr.com.

Additionally, you will have to register an API Application in order to use the API. But, they're free and easy to create! Just fill out a few fields on https://www.tumblr.com/oauth/apps and you'll be all set! If a field is not applicable, leave it blank, and if you don't have a specific application website, you can use a personal website.

xAuth is no longer supported for API Applications, so you'll need to use the OAuth flow. If you're not intending to use your app with anyone's accounts by your own, you can go to https://api.tumblr.com/console, login with your consumer key and secret, and get a set of OAuth tokens tied to your account that you can use in your app. Emulating a browser via curl is not advisable since it will likely be detected as spam.

Let me know if you have any other issues getting it setup.

Regards,
Mike

Amy Adzuki

unread,
Aug 20, 2017, 10:35:53 AM8/20/17
to Tumblr API Discussion
Hi Mike,

Thank you so very much for your reply!

Thank you for letting me know the v1 API is deprecated -- I had trouble finding any information on it outside of this discussion group and now that makes sense.  It is also good to know that not all of the fields are required.  Also, thank you for the link to the documentation!  I thought I had seen it before, but I think I would have remembered seeing this:

If you're looking for documentation for the old API, you can find it here.

...not that I will be using the old API now that I know that it is deprecated :)  I will still probably take a look just for reference and to see what has changed in the new version!

...if you don't have a specific application website, you can use a personal website.

Mike, I don't have any website.  This was my main concern.  I only have personal computers at home, and the only computer I have with a static IP will not work for various reasons.  I also do not want to pay for a domain (and for hosting to avoid using my personal computers) just to be able to post to my own account via the API.  Is there any way to call back to my Tumblr blog itself or even to GitHub or something instead of a website that I have to pay for?  I am sorry if this question is stupid, but I am new to web development and I really have no idea what the callback URL entails except that it needs to support the https protocol.

Emulating a browser via curl is not advisable since it will likely be detected as spam.

That is good to know!  Thank you for warning me about this!

I have one last question if you don't mind:  Is there a bug tracker for the Tumblr mobile app for Android?  I think I found a bug.

Thank you again,
amy


2017年8月16日水曜日 10時57分39秒 UTC-5 Michael Ceyko:
Hi Amy,

Glad to hear you're interested in using the Tumblr API!

First off, you'll have to use the v2 API - v1 is deprecated and set to read-only mode, so it won't work for your purposes. You can find the API v2 documentation at https://api.tumblr.com.

Additionally, you will have to register an API Application in order to use the API. But, they're free and easy to create! Just fill out a few fields on https://www.tumblr.com/oauth/apps and you'll be all set! If a field is not applicable, leave it blank, and if you don't have a specific application website, you can use a personal website.

xAuth is no longer supported for API Applications, so you'll need to use the OAuth flow. If you're not intending to use your app with anyone's accounts by your own, you can go to https://api.tumblr.com/console, login with your consumer key and secret, and get a set of OAuth tokens tied to your account that you can use in your app. Emulating a browser via curl is not advisable since it will likely be detected as spam.

Let me know if you have any other issues getting it setup.

Regards,
Mike

On Tuesday, August 15, 2017 at 12:16:43 PM UTC-4, Amy Adzuki wrote:
Hello,

[snip]

I would like to partially control a couple of my blogs from an external program or script.  Specifically, I would like to be able to write a C program which posts to my blogs via the tumblr API (either version, as I take it that there are two).  I could do this easily with OAuth as explained in the tumblr API docs, but I really do not want to have to register my apps with tumblr -- since the only blog that will be posted to is my own, I would love it if I could just hard-code my e-mail and password into my program!  From browsing the forum, it looks like it is possible to authenticate with an e-mail/password pair by using something called xAuth, which I had never heard of.  Google points me to the X.org manual page, but I doubt that is the same xAuth as described here.  Does the xAuth method still require that I register my app?  If so, is there anything that can be done about this?  If not, could someone please point me to some documentation for the xAuth used by the tumblr API?

If the xAuth method also requires that I register my app with tumblr, does anyone know if it would be possible to use cURL to emulate a browser login?  Specifically, will I start getting capchas if tumblr decides that it is suspicious that I am logging in from a certain UA at the same times of day, 24 hours per day, or simultaneously with another active login?

[snip]

Michael Ceyko

unread,
Aug 21, 2017, 4:55:13 PM8/21/17
to Tumblr API Discussion
Your Github page is fine to use as the application website on the form. Since you only plan to use the API with your own blogs, you don't really need to worry too much about callback urls right now. Logging in with the API Console should give you the sufficient credentials.

There is no bug tracker for the apps, but we welcome feedback and bug reports through our support form! https://www.tumblr.com/support

Best of luck!
-Mike

Amy Adzuki

unread,
Aug 22, 2017, 10:42:56 PM8/22/17
to Tumblr API Discussion
Mike,

Thank you so much for all the help!  Today, thanks to you, I was able to post to one of my blogs via a C program, using libcurl and liboauth (I had never used either library before)!  I am so happy and so excited to be using the API.  Hooray!
゚・*:.。..。.:*・゜ヽ( ´∀`)人(´∀` )ノ・゜゚・*:.。..。.:*

I will check out the support form when I (stop posting random stuff via the API) get a chance.

I hope you are having a good day like I am!!
amy ♡
\(´O`)/


2017年8月21日月曜日 20時55分13秒 UTC Michael Ceyko:
[snip]

There is no bug tracker for the apps, but we welcome feedback and bug reports through our support form! https://www.tumblr.com/support

Best of luck!
-Mike

[snip]
Reply all
Reply to author
Forward
0 new messages