Pinterest JSON format Error

Hello, I try to send request to pinterest API - /v5/media . In body add json like a string. Add headers about “application/json” content-type. And one time it work normal and return 200 code. And next time just get error like: The operation failed with an error. Body is not a valid JSON. Unexpected token ‘’, “�”… is not valid JSON

Between this few times I can don’t change anything in request body and it can just begin or stop work randomly.

Hi Asy, can you show me the JSON you are trying to send?

Yes, sure, add screen with JSON, answers and input bundels

I can’t help you that much because I don’t have a Pinterest developer account, but have you tried separating the body?

{
"media_type": “video”
}

Hey everyone

I’m trying to send a request to the Pinterest API, but I’m getting a JSON format error.

Here’s a simplified example of the body I’m using:

{
  "media_type": "video"
}

Has anyone faced this issue before?

  • Do I need to separate or format the body differently?
  • Or is there a specific structure Pinterest expects?

Any tips or examples would be really appreciated

I found out that response is okey, but pinterest return 201 header and make can’t to take it. Right now try to fix

1 Like

Thanks for the update, Asy

Hey Mate,

there are 2 known issues with Pinterest API regarding this.

The one you are posting and a second one where it returns a 201 status with gzip instead of JSON. There is nothing you can do about both of them.

Just add a break module and configure it to keep retrying until the call goes through.

I think about one idea, but it could not working) what if use instead of make request from own server to get url fol video loading and next load video already using make. Not sure about this, but like idea

The issue is not with Make, doesn’t matter which server you are using.

If you use your own server for the call, you still need to add error handling for when you receive the faulty response.

I saw this response in make debug console, and it show in normal format. So in my own script of course I can handle any error and ungzip response. I am interested in other, I haven’t token from make to oauth, so can I get this token from make or need only to create new one from a different application. And if need new, does it will work in make to continue loading video and other operation.