Pinterest
OAuth 2.0 with refresh-token grant. Token exchange uses Basic auth (appId:appSecret).
Authentication at a glance
| Field | Value |
|---|---|
| Auth model | OAuth 2.0 |
| Required ENV | PINTEREST_APP_ID, PINTEREST_APP_SECRET |
| Callback URL | ${BASE_URL}/api/v1/auth/pinterest/callback |
| Scopes / permissions | boards:read, pins:read, pins:write, user_accounts:read |
| Auto token refresh | Yes — every 7 days before expiry |
How to connect
- Open Connections → Pinterest → Connect.
- Sign in to Pinterest and grant the scopes.
- 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
datafield and auto-selectsboards[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.