Skip to content

How do I post the json file using twurl? #150

@selvipt

Description

@selvipt

I am getting The JSON string format is invalid error, When I tried to add the tailored audience user via JSON file. When I tried using the actual payload and it was successful. Does the twurl support file upload? I am expecting something similar the curl has the support like [curl -vX POST http://server/api/v1/places.json -d @testplace.json
--header "Content-Type: application/json"]

URL:
twurl --header 'Content-Type: application/json' -X POST -H "https://ads-api.twitter.com" "/7/accounts/ddg12333/tailored_audiences/33444/users" -r "@/home/k/Downloads/2020-06-30_emails.json"

Response:
{
"errors": [
{
"code": "INVALID",
"message": "The JSON string format is invalid"
}
],
"request": [],
"operation_errors": []
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions