Node.js NPM

Node.js JavaScript NPM Package for Ayrshare

Overview of Node JS Social Media Package

Install the Social API NPM Package if you use Node.js on the server-side. The package simplifies the calls by wrapping the RESTful calls.

Obtain your secret API Key at


npm i social-media-api

General Usage

Examples of Post, History, and Delete:

const SocialPost = require("social-media-api");
const API_KEY = "API KEY"; // get an API Key at
const social = new SocialPost(API_KEY);
const run = async () => {
  /** post */
  const post = await{
    post: "One more time",
    platforms: ["twitter", "facebook", "linkedin"],
    profileKey: "DJKJDK-SKDJKDJF" // used with a User Profile
  /** history */
  const history = await social.history().catch(console.error);
  /** delete */
  const deletePost = await social.delete({ id: }).catch(console.error);

Video Overview of the Social Media API NPM Package

Profile Key

You may specify the Profile Key for User Profile in the body of a POST or query of a GET with the profileKey field.

More Information and Documentation

Last updated