Skip to content

Maithili : Create auto poster pinterest#2268

Open
maithili20 wants to merge 1 commit into
developmentfrom
maithili-pinterest-autoposter-be
Open

Maithili : Create auto poster pinterest#2268
maithili20 wants to merge 1 commit into
developmentfrom
maithili-pinterest-autoposter-be

Conversation

@maithili20

@maithili20 maithili20 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

Create appropriate auto-poster for Pinterest

Related PRS (if any):

To test this backend PR you need to checkout the 5380 frontend PR.

Main changes explained:

  1. Added ‎src/controllers/socialMediaControllers.js
  2. Added src/cronjobs/pinterestScheduleJob.js‎
  3. Added src/models/pinterestSchedule.js
  4. Added src/routes/socialMediaRouter.js
  5. Updated src/startup/middleware.js
  6. Updated src/startup/routes.js
  7. Updated src/server.js

Initial setup to create Pinterest account and application:

Step 1 — Create a Pinterest Developer account

Go to https://developers.pinterest.com and sign in with your Pinterest account. If you don't have one, create a free Pinterest account first.


Step 2 — Create an app

  1. Click My Apps in the top navigation
  2. Click Connect app
  3. Fill in the form:
    • App name: e.g. OneCommunity
    • App description: e.g. Social media auto poster
    • What are you building: select Other
  4. Accept the terms and click Submit

Step 3 — Get your App ID and App Secret

  1. After creating the app, you land on the app dashboard
  2. You will see App ID — this is your PINTEREST_APP_ID
  3. Click Show next to App secret key — this is your PINTEREST_APP_SECRET
  4. Copy both into your .env:
PINTEREST_APP_ID=your_app_id_here
PINTEREST_APP_SECRET=your_app_secret_here

Step 4 — Add your redirect URI

  1. On the same app dashboard, scroll to Redirect URIs
  2. Click Add and enter:
http://localhost:4500/api/social/pinterest/auth/callback
  1. Click Save

Step 5 — Request API access

Pinterest apps start in sandbox mode by default, which limits what you can do.

  1. On your app dashboard, click Request default access or Modify access
  2. Request these scopes:
    • pins:read
    • pins:write
    • boards:read
    • boards:write
    • users:read
  3. Submit the request — Pinterest may take a few days to approve

Step 6 — Set sandbox vs production in your .env

While waiting for approval, use sandbox mode:

PINTEREST_SANDBOX_API=true
PINTEREST_SANDBOX_API_TOKEN=your_sandbox_token

To get the sandbox token:

  1. On your app dashboard, click Generate token under the sandbox section
  2. Select all the scopes listed above
  3. Click Generate — copy the token into PINTEREST_SANDBOX_API_TOKEN

Once Pinterest approves your app for production:

PINTEREST_SANDBOX_API=false
PINTEREST_SANDBOX_API_TOKEN=

These will be in you env file

PINTEREST_SANDBOX_API=true/false
PINTEREST_SANDBOX_API_TOKEN=
PINTEREST_APP_ID=
PINTEREST_APP_SECRET=

How to test:

  1. Check into current branch
  2. Do npm install and npm run start:local to run this PR locally
  3. Clear site data/cache
  4. Log as owner user
  5. Go to http://localhost:5173/announcements and click on the Pinterest icon
  6. Verify functionalities below:
  • Create and upload a post immediately
    - Fill in the form
    - Try out all the options
    - Click the Post button
    - Verify that the post appears in your Pinterest account with the correct title, images, descriptions

  • Create and delete scheduled post
    - Fill in the form
    - Click Schedule button
    - Confirm the post appears under the Pin Queue section immediately.
    - Test deleting the scheduled post: After clicking Remove, ensure the post is removed from the Scheduled Posts section instantly.
    - Wait for the scheduled time and verify that the post is published to your Pinterest account as expected. Also verify that post is removed from Pin Queue

Screenshots or videos of changes:

https://www.dropbox.com/scl/fi/ae41s6fmdkoz76g72ryh0/screen-recording-2026-07-09-at-34456-pm_ziZ7d8sb.mov?rlkey=7iwspku06w295hqpd788toyna&st=w4h6pb3a&dl=0

@maithili20 maithili20 changed the title fix: add the files related to pinterest autoposter Maithili : Create auto poster pinterest Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant