Sign In

@dropreply/sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dropreply/sdk

Official Node.js SDK for DropReply — publish replies on Reddit & X

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

DropReply Node.js SDK

Official Node.js SDK for DropReply — publish replies and upvotes on Reddit & X programmatically.

Installation

npm install dropreply

Requires Node.js 18+ (uses native fetch).

Quick Start

const DropReply = require('dropreply');

const client = new DropReply('drpl_live_sk_your_key_here');

// Submit a reply
const reply = await client.reply({
  platform: 'reddit',
  target_url: 'https://www.reddit.com/r/startup/comments/abc123/...',
  content: 'Great point! We built something similar...'
});

console.log(reply.id);     // 'rpl_abc123'
console.log(reply.status); // 'queued'

Configuration

const client = new DropReply('drpl_live_sk_xxx', {
  baseUrl: 'https://api.dropreply.com',  // default
  timeout: 30000                         // request timeout in ms (default: 30s)
});

Methods

client.reply(opts)

Submit a reply for publishing.

const reply = await client.reply({
  platform: 'reddit',         // 'reddit' or 'twitter'
  target_url: 'https://...',  // URL of the post to reply to
  content: 'Your reply text', // 10–2000 characters
  schedule_at: '2026-03-25T14:00:00Z' // optional: ISO 8601 datetime (Growth/Scale only)
});

// Returns:
// {
//   id: 'rpl_abc123',
//   status: 'queued',           // or 'scheduled' if schedule_at was set
//   platform: 'reddit',
//   target_url: 'https://...',
//   credit_cost: 1,
//   schedule_at: null,          // or the scheduled datetime
//   created_at: '2026-03-22T...'
// }

client.getReply(id)

Get the status and details of a reply.

const reply = await client.getReply('rpl_abc123');

// Returns:
// {
//   id: 'rpl_abc123',
//   platform: 'reddit',
//   target_url: 'https://...',
//   content: 'Your reply text',
//   credit_cost: 1,
//   status: 'published',        // 'queued' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'rejected'
//   published_url: 'https://...', // set when published
//   schedule_at: null,
//   published_at: '2026-03-22T...',
//   created_at: '2026-03-22T...'
// }

client.listReplies(opts)

List replies with optional filtering and pagination.

const result = await client.listReplies({
  platform: 'reddit',  // optional filter
  status: 'published', // optional filter
  limit: 10,           // default: 20, max: 100
  offset: 0            // pagination offset
});

// Returns:
// {
//   data: [ { id, platform, status, ... }, ... ],
//   pagination: { total: 42, limit: 10, offset: 0 }
// }

client.upvote(opts)

Submit an upvote/like job.

const upvote = await client.upvote({
  platform: 'reddit',
  target_url: 'https://www.reddit.com/r/startup/comments/abc123/...'
});

// Returns:
// {
//   id: 'upv_xyz789',
//   status: 'queued',
//   platform: 'reddit',
//   target_url: 'https://...',
//   credit_cost: 0.25,
//   created_at: '2026-03-22T...'
// }

client.usage()

Get current credit balance and plan info.

const usage = await client.usage();

// Returns:
// {
//   plan: 'growth',
//   credits_included: 100,
//   credits_used: 23,
//   credits_remaining: 77,
//   extra_credits: 0,
//   total_available: 77,
//   billing_period_start: '2026-03-01T...',
//   billing_period_end: '2026-04-01T...'
// }

client.accountsAvailability(opts)

Check available managed accounts.

const result = await client.accountsAvailability({
  platform: 'reddit' // optional filter
});

// Returns:
// {
//   accounts: [
//     { platform: 'reddit', available: 12 }
//   ]
// }

Error Handling

All methods throw DropReplyError on failure:

const { DropReplyError } = require('dropreply');

try {
  await client.reply({ platform: 'reddit', target_url: '...', content: '...' });
} catch (err) {
  if (err instanceof DropReplyError) {
    console.error(err.statusCode);  // HTTP status code (e.g. 400, 402, 422)
    console.error(err.errorCode);   // API error code (e.g. 'validation_error', 'insufficient_credits')
    console.error(err.message);     // Human-readable error message
  }
}

Common error codes:

  • validation_error (400) — Invalid input parameters
  • insufficient_credits (402) — Not enough credits
  • plan_required (403) — Feature requires a higher plan (e.g. scheduled replies)
  • not_found (404) — Resource not found
  • moderation_rejected (422) — Content failed moderation
  • concurrent_limit (429) — Too many replies in progress
  • rate_limit_exceeded (429) — Too many requests
  • internal_error (500) — Server error

License

MIT

Keywords

dropreply

FAQs

Package last updated on 23 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts