Skip to content

Pinterest

OAuth 2.0 with refresh-token grant. Token exchange uses Basic auth (appId:appSecret).

Authentication at a glance

FieldValue
Auth modelOAuth 2.0
Required ENVPINTEREST_APP_ID, PINTEREST_APP_SECRET
Callback URL${BASE_URL}/api/v1/auth/pinterest/callback
Scopes / permissionsboards:read, pins:read, pins:write, user_accounts:read
Auto token refreshYes — every 7 days before expiry

How to connect

  1. Open ConnectionsPinterestConnect.
  2. Sign in to Pinterest and grant the scopes.
  3. Pick the default board on the post-connect screen.

Token refresh

Auto-refreshed. The tokenRefresh.queue.ts worker sweeps Pinterest accounts and refreshes when expiresAt - now < 7 days. Default access-token TTL is 30 days.

Notes

  • Sosyabot caches the user's full board list in the channel's data field and auto-selects boards[0] as the default board. Change the default from channel settings.
  • The Marketing API tier of the Pinterest app affects available endpoints — apply for production access if you hit 403 invalid scope.
  • Each pin must target a specific board; selecting Default board in the composer uses the channel's stored default.

Troubleshooting

If the channel shows needs_reconnect, the access token was rejected by Pinterest. Common causes:

  • The user revoked Sosyabot's authorization on the platform.
  • The platform invalidated the token (password change, security event).
  • Your OAuth app credentials rotated and the existing tokens no longer match.

Re-run the connect flow above. See Troubleshooting for the workspace-wide checklist.