如何在Postman中向指定Pinterest看板发起HTTP请求添加带图Pin
Alright, let's walk through exactly how to create a Pin with an image for your existing Pinterest board using Postman. I’ve gone through this process multiple times, so I’ll break it down into clear, actionable steps.
Prerequisites First
Before you dive in, make sure you have these ready:
- Your target Pinterest Board ID (you already have this, but double-check it’s the correct alphanumeric string like
123456789012345678) - A valid Pinterest Access Token with at least the
pins:createandboards:readscopes. If you don’t have one, generate it via Pinterest’s Developer Portal by creating an app and completing the OAuth flow.
Step 1: Configure the Postman Request
Open Postman and set up your request like this:
- Request Method: Select
POST - Request URL: Enter
https://api.pinterest.com/v5/pins
Step 2: Set Up Request Headers
Go to the "Headers" tab and add these key-value pairs:
Authorization:Bearer YOUR_ACCESS_TOKEN(replaceYOUR_ACCESS_TOKENwith your actual token)Content-Type:application/json(use this if you’re linking to a public image; we’ll cover local image uploads next)
Step 3: Create the Request Body (Two Options for Images)
You have two ways to attach an image to your Pin—pick the one that fits your use case:
Option 1: Use a Publicly Accessible Image URL
If your image is hosted online (and publicly viewable), use this JSON body. Go to the "Body" tab, select "raw" and set the format to JSON, then paste:
{ "board_id": "YOUR_BOARD_ID", "title": "Your Pin’s Catchy Title", "description": "A short, engaging description for your Pin", "link": "https://your-website-or-content-link.com", // Optional: Link to related content "image_url": "https://example.com/your-image-file.jpg" // Must be a public, direct image URL }
Note: You can include the board_name field if you want, but it’s not required since board_id is unique.
Option 2: Upload a Local Image
If you want to upload an image from your computer, switch up the request setup:
- Go to the "Body" tab and select
form-data - Add these form fields:
board_id: Enter your board ID (set type to "Text")title: Your Pin’s title (Text)description: Pin description (Text)link: Optional content link (Text)image: Select "File" as the type, then click "Select Files" to choose your local image (supports JPG, PNG, etc., max ~10MB)
Step 4: Send the Request & Verify
Click the "Send" button in Postman.
- A successful request will return a
201 Createdstatus code, along with a JSON response containing your new Pin’s ID, URL, and other details. - If you get an error:
401 Unauthorized: Check that your access token is valid and hasn’t expired.403 Forbidden: Ensure your token has thepins:createscope enabled.400 Bad Request: Verify the image URL is public/valid, or that your local image meets Pinterest’s format/size requirements.
内容的提问来源于stack exchange,提问作者Vipul Tyagi

