Reputation: 323
While invoking create pin api with uploaded image i got the below exception,
{"message": "You need to upload an image or provide the 'image_url' parameter", "type": "api"}
Can anyone tell me how to upload image in Pinterest API and what should be the format of an image?
Upvotes: 1
Views: 5664
Reputation: 79
You have 3 options:
If the image is already on the web, you can pass in the URL directly as the image_url
parameter, as shown in the example request on https://developers.pinterest.com/docs/api/pins/.
You can post an image file directly as the image
param however you would normally post a file in the framework you are using.
You can post Base64 encoded image data as the image_base64
param.
Upvotes: 4