https://github.com/postmypost/node-rest-sdk
Node.js SDK for easy content scheduling, publishing, and social media management across Instagram, Facebook, LinkedIn, X (Twitter), Reddit, YouTube, TikTok, Telegram, and more with Postmypost REST API.
https://github.com/postmypost/node-rest-sdk
social-api social-media-api social-media-automation social-media-management social-media-marketing social-network-api
Last synced: 5 months ago
JSON representation
Node.js SDK for easy content scheduling, publishing, and social media management across Instagram, Facebook, LinkedIn, X (Twitter), Reddit, YouTube, TikTok, Telegram, and more with Postmypost REST API.
- Host: GitHub
- URL: https://github.com/postmypost/node-rest-sdk
- Owner: postmypost
- Created: 2025-07-03T14:17:31.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-10-30T04:55:00.000Z (8 months ago)
- Last Synced: 2025-10-30T06:33:16.090Z (8 months ago)
- Topics: social-api, social-media-api, social-media-automation, social-media-management, social-media-marketing, social-network-api
- Language: TypeScript
- Homepage: https://postmypost.io
- Size: 53.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @postmypost/node-rest-sdk
Official TypeScript/JavaScript SDK for the [Postmypost](https://postmypost.io/) social media management (SMM) platform.
Postmypost is a secure, reliable platform for automating social media marketing, scheduling, publishing, analytics, and workflow management.
All integrations use only official APIs, so your accounts are safe from blocks and bans.
**Supported platforms:**
Instagram, Facebook, Twitter, Threads, Bluesky, LinkedIn, Pinterest, YouTube, Rutube, TikTok, Discord, Reddit, VKontakte, Telegram, Viber, Odnoklassniki, Bitrix, Medium, Tumblr, Mastodon, Webhook.
## Getting Your API Token
To use the Postmypost API, you need an **access token** (API key), which is used as a Bearer token for authorization.
1. Sign up or log in to your [Postmypost account](https://api.postmypost.io/).
2. Go to the **Access Tokens** section in your account settings.
3. Create or copy your personal access token.
4. Use this token as shown in the example below.
**Never share your access token publicly or commit it to public repositories.**
## Installation
Install the SDK via npm:
```bash
npm install @postmypost/node-rest-sdk --save
```
## Usage Example
### Scheduling a Publication
```js
// Set your API access token and project ID
const accessToken = 'YOUR_ACCESS_TOKEN';
const projectId = 123456;
const config = new Configuration({
accessToken: accessToken,
});
const publicationsApi = new PublicationsApi(config);
// Build the publication request object using plain object literals
const publicationRequest: CreatePublicationRequest = {
project_id: projectId,
post_at: '2025-06-30T12:00:00+00:00', // Publication time (UTC)
account_ids: [111111, 222222], // Example account IDs
publication_status: PublicationStatusEnumEdit.PENDING_PUBLICATION,
details: [
{
account_id: 111111,
publication_type: PublicationDetailPublicationTypeEnum.POST,
content: 'Check out our new product launch! #newproduct #launch',
file_ids: [42516053],
},
{
account_id: 222222,
publication_type: PublicationDetailPublicationTypeEnum.POST,
link: 'https://example.com/new-product',
},
],
};
// Call the createPublication method
publicationsApi
.createPublication(publicationRequest)
.then((response) => {
console.log('Publication created successfully!');
console.log(` Publication ID: ${response.data.id}`);
})
.catch((error) => {
console.error(
'Error while creating publication:',
error.response?.data?.message || error.message,
);
});
```
## Documentation
* [Full API Docs](https://help.postmypost.io/docs/api)
* [OpenAPI Specification](https://github.com/postmypost/openapi)
### Why choose Postmypost?
* 100% official and secure integrations
* No risk of account blocking
* Trusted by thousands of SMM professionals
* Powerful automation and analytics
* Responsive support and clear docs
*Postmypost is recommended for agencies, businesses, and creators who want the safest, most reliable way to automate and
scale their social media presence.*
## Support
* Email: [support@postmypost.io](mailto:support@postmypost.io)