How Tumblr OAuth works
Tumblr’s OAuth 1.0a flow has three steps:- Hayon requests a temporary request token from
https://www.tumblr.com/oauth/request_tokenand stores it server-side. - You are redirected to Tumblr’s authorization page at
https://www.tumblr.com/oauth/authorizewhere you approve access. - Tumblr redirects back to Hayon’s callback with an
oauth_verifier. Hayon exchanges the request token + verifier for a permanent access token and access token secret.
oauthToken and oauthTokenSecret are stored in your SocialAccount document and used to sign all future API requests via HMAC-SHA1.
Connecting your Tumblr blog
Open platform settings
In the Hayon dashboard, navigate to Settings > Connected accounts and click Connect next to Tumblr.
Hayon obtains a request token
Hayon calls
GET /api/platform/tumblr/connect, which contacts Tumblr’s OAuth endpoint and returns an authorization URL.Authorize on Tumblr
Your browser opens Tumblr’s authorization page. Review the permissions and click Allow.
Callback and token exchange
Tumblr redirects you back to Hayon’s callback endpoint (
GET /api/platform/tumblr/callback). Hayon exchanges the verifier for your permanent access token and fetches your blog information.Primary blog selected
Hayon automatically selects your primary blog from the list of blogs on your account. The blog’s hostname (e.g.
yourblog.tumblr.com) is stored as blogHostname.What Hayon stores
After a successful connection, the following fields are stored for Tumblr:| Field | Description |
|---|---|
connected | true once authorized |
blogHostname | Hostname of your primary blog (e.g. yourblog.tumblr.com) |
auth.oauthToken | Permanent OAuth access token |
auth.oauthTokenSecret | OAuth access token secret (used for HMAC-SHA1 signing) |
profile.handle | Your Tumblr username |
profile.avatar | URL of your blog’s 512px avatar image |
Tumblr OAuth 1.0a access tokens do not expire. Once connected, Hayon can continue using the stored tokens indefinitely unless you revoke access on Tumblr.
Blog selection
Hayon always connects your primary blog — the first blog markedprimary: true in the Tumblr API response. If no primary blog is found, the first blog in the list is used.
If you have multiple Tumblr blogs and want to post to a secondary blog, this is not currently supported through the standard connection flow. The
blogHostname is stored and used for all post operations.Supported content types
Tumblr supports a rich variety of post types. Hayon’s current integration focuses on the most common:| Content type | Supported |
|---|---|
| Text posts | Yes |
| Photo posts (single image) | Yes |
| Photo posts (multiple images) | Yes |
| Link posts | Yes |
| Quote posts | No |
| Audio posts | No |
| Video posts | No |
| Chat posts | No |
Media constraints
- Image formats: JPEG, PNG, GIF, WebP.
- Image size: Maximum 10 MB per image via the Tumblr API v2.
- Images per post: Up to 10 images in a single photo post.
- GIF support: Animated GIFs are supported on Tumblr natively.
- Alt text: Tumblr’s NPF (Neue Post Format) supports alt text per image block.
Refreshing your profile
To refresh your stored Tumblr profile (handle and avatar) without reconnecting, call:https://api.tumblr.com/v2/user/info using your stored tokens and updates the handle, blogHostname, and avatar fields.
Disconnecting
To disconnect Tumblr, navigate to Settings > Connected accounts and click Disconnect next to Tumblr, or call:oauthToken, oauthTokenSecret, and profile data, and sets connected: false.
Troubleshooting
Tumblr OAuth session expired
Tumblr OAuth session expired
This error appears when the in-memory request token has been cleaned up before the callback arrived. This happens if you take more than a few minutes on the authorization page, or if the server restarted mid-flow. Click Connect again to start a new OAuth session.
Wrong blog is connected
Wrong blog is connected
Hayon selects your primary Tumblr blog automatically. If this is not the blog you want to use, you must change which blog is set as primary in your Tumblr account settings, then disconnect and reconnect in Hayon.
Avatar not loading
Avatar not loading
The avatar URL is fetched from the Tumblr Avatar API:
https://api.tumblr.com/v2/blog/{blogHostname}/avatar/512. If the avatar appears broken, use the refresh endpoint to re-fetch it.