Skip to content

Pinterest API Setup

Admin walkthrough for the Pinterest integration. End-user flow: Connections → Pinterest.

Overview

Form fieldOptions key
App IDpinterest_app-id
App Secretpinterest_app-secret
Statuspinterest_integration_status

ENV fallback: PINTEREST_APP_ID + PINTEREST_APP_SECRET.

Step-by-step on developers.pinterest.com

1. Sign in and create an app

https://developers.pinterest.comMy Apps → Connect app. Pinterest will prompt to create a developer profile if you don't have one (one-time form: company info, use case).

Provide:

  • App name
  • Description
  • Website URL: https://sosyabot.com

2. Configure redirect URI

In the new app's settings:

  • Redirect URIs:
    https://app.sosyabot.com/api/v1/auth/pinterest/callback
    Self-hosters: substitute BASE_URL.

3. Request scopes

Pinterest API v5 scopes Sosyabot uses: boards:read, pins:read, pins:write, user_accounts:read. These are available immediately on Pinterest's Trial tier (limited request rate); for higher rate limits apply for Standard access via the Marketing API application form.

4. Grab App ID + App Secret

App settings page → App credentials. Copy App ID and App Secret.

Pasting into Sosyabot admin panel

/admin/api-integration/pinterest. Paste, Enable, Save, Test credentials.

Failure: Pinterest integration disabled: app id/secret not configured.

Verification

/app/channels → Connect → Pinterest → OAuth → approve → pick a default board on the post-connect screen. Pin a test image from /app/publishing.

Troubleshooting

SymptomCauseFix
Pinterest integration disabled: app id/secret not configuredAdmin + ENV emptySteps 1–4.
403 invalid scope on a v5 endpointTrial tier rate limit / scope unavailableApply for Standard access in the Pinterest Marketing API form.
Token expires after 30 daysDefault Pinterest TTLSosyabot auto-refreshes via tokenRefresh.queue.ts 7 days before expiry — confirm the worker is running.
Pin fails with board_id is invalidUser's selected default board no longer existsUser must re-select default board in channel settings.

ENV fallback

PINTEREST_APP_ID=<your app id>
PINTEREST_APP_SECRET=<your app secret>

After editing .env run ./service.sh restart api.