Vote on a Reddit post or comment
Cast, change, or clear the connected account's vote on a Reddit post or comment.
Reddit requires that votes be cast by humans. Reddit's API terms permit a client to proxy a human's action one-for-one, and prohibit a bot from deciding how to vote or from amplifying a human's vote. Call this endpoint only in direct response to an explicit action by the account owner. Automated or agent-decided voting is vote manipulation and puts API access at risk.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
The ID of the Reddit account casting the vote
Reddit fullname of the target. Prefix "t3_" for a post and "t1_" for a comment. A bare id with no prefix is treated as a post ("t3_").
1 to upvote, -1 to downvote, 0 to clear an existing vote
1 | 0 | -1Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.voteRedditThing({ path: { accountId: 'account_abc123', }, body: { thingId: 't3_abc123', direction: 1, },});console.log(data);{
"success": true
}{
"error": "Unauthorized"
}Set Reddit post flair POST
Applies a flair to a post the connected account already published. Use the GET on this path to list the available `flairTemplateId` values for the subreddit. Flair can also be set at submit time by passing `flairId` in `platformSpecificData` when creating the post. This endpoint is for changing it afterwards. The subreddit must allow users to select their own post flair. Setting flair on another user's post requires moderator permissions, which Zernio does not request.
Set default subreddit PUT
Sets the default subreddit used when publishing posts for this Reddit account.