Jinu Santh Rose
Jinu Santh Rose

Reputation: 323

Upload Image in Create Pin API

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

Answers (1)

Jean
Jean

Reputation: 79

You have 3 options:

  1. 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/.

  2. You can post an image file directly as the image param however you would normally post a file in the framework you are using.

  3. You can post Base64 encoded image data as the image_base64 param.

Upvotes: 4

Related Questions