Hi everyone, I’m using the file API with V3, Basically I have an URL with a file, and I need to get this file and save to Hubspot, I tried to request from Postman and also from the endpoint page with my api_key but keeps getting 400 bad request with the following response:
{
“status”: “error”,
“message”: “Invalid input JSON on line 7, column 1: Cannot construct instance of `com.hubspot.content.filemanager.service.external.models.files.ImportFromUrlInput`, problem: Error validating request.”,
“correlationId”: “35e00923-5f3b-4eee-83a9-579355dda4b2”
}
Can someone help me ?
Thanks
Hi @avlambertucci
Can you provide the request body that you are sending?
Sure
I’m sendind only the required params
URL: https://api.hubapi.com/files/v3/files/import-from-url/async?hapikey=API_KEY
BODY:
{
“access”: “PUBLIC_INDEXABLE”,
“url”: “https://mozaik-public.s3-sa-east-1.amazonaws.com/5c60c99d7b2e323f65954af5/images/Users/5db2f93d1c9d4…”,
“duplicateValidationStrategy”: “NONE”,
“duplicateValidationScope”: “ENTIRE_PORTAL”,
“overwrite”: true
}
@avlambertucci ,
I can reproduce your issue and will get this to team to work on.
@avlambertucci
Figured out the problem. And it is an issue of how to properly indicate an either/or requirement scenario. If you take a look at the docs, you will see this: