Pinterest channels create Pins on one of your boards through the UmbHost.Automate.Pinterest package and its Create Pin action (pinterest.createPin).
dotnet add package UmbHost.Automate.PinterestEach site uses its own Pinterest app and its own access. UmbHost doesn’t need access to your app, and your Pins never pass through UmbHost.
What Pinterest needs
Section titled “What Pinterest needs”-
Use a Pinterest business account. A personal account can be converted to one for free in Pinterest’s settings.
-
Go to My apps on Pinterest Developers and choose Connect app. Fill in the request form, describing how the site will create Pins, and submit it. Pinterest reviews the request before the app is created, which usually takes a few days.
-
Once the app is approved, it starts with Trial access: Pins it creates are visible only to you. When you’re ready to post publicly, choose Upgrade on the app and apply for Standard access. Pinterest reviews that request too, and may ask for a video of the app in use.
-
In the app’s settings, add the redirect URI
https://<your-site>/umbraco/automate/oauth/callback/pinterest, and copy the App id and App secret key. -
Add them to configuration:
{"Umbraco": {"Automate": {"Providers": {"Pinterest": { "ClientId": "<App id>", "ClientSecret": "<App secret key>" }}}}}Keep the secret out of
appsettings.jsonin source control, in user secrets or an environment variable (Umbraco__Automate__Providers__Pinterest__ClientSecret). The package asks for theboards:read,boards:write,pins:readandpins:writescopes itself: the ones Pinterest’s API description lists for creating a Pin. Without aClientId, the Pinterest provider is skipped, and UmbSocial doesn’t offer Pinterest.
The Automate connection
Section titled “The Automate connection”Automate → Connections → Create → Pinterest → Authorize, signed in to the business account that owns the boards.
Validate checks the connection and lists your boards, one per line, as the board’s name followed by its id in brackets, for example Recipes (549755885175). Copy the id of the board the channel should pin to. If you have no boards yet, Validate warns No boards found: create one in Pinterest first.
Pinterest’s tokens last 30 days, and the package renews them automatically.
Then add the channel as described in Connecting networks.
Channel options
Section titled “Channel options”| Option | Values | Default |
|---|---|---|
boardId |
The board’s numeric id, from Validate on the connection. Required. | none |
What is sent
Section titled “What is sent”| Post field | Sent as |
|---|---|
| Text | The Pin’s description, up to 800 characters. |
| Pin title | The Pin’s title, up to 100 characters. Set it under Network extras in the composer. Optional. |
| Image | Required: every Pin is an image. Pinterest fetches it from your site, so the site must be reachable from the internet. |
| Image alt text | Sent (up to 500 characters, Pinterest’s own limit). |
| Link URL | The Pin’s link, opened when someone selects the Pin. It isn’t added to the description. |
| Link title and description | Not sent. |
UmbSocial checks these rules before a post is saved:
- An image is required (
image.required:pinterest) to queue, schedule or publish a Pin. A draft saves without one, with a warning on the image field. - The Pin title is up to 100 characters (
title.too_long:pinterest). - The alt text is up to 500 characters (
alt_text.too_long:pinterest). Other networks take up to 1,000, so shorten it if the post goes to Pinterest too.
See Network limits.
When a post fails
Section titled “When a post fails”Pinterest has no idempotency key. If the request that creates the Pin fails without a clear answer, the action doesn’t retry, and UmbSocial records the post as Unknown: check the board before retrying.