the data has to be passed as querystring=value. It you pass it as JSON, you’ll see the error above.
Here is a working query:
curl --request 'POST' 'https://ads-api-sandbox.twitter.com/1/accounts/' --data 'name=sandbox_account' \
--header 'Authorization: OAuth oauth_consumer_key="{consumer_key_value}", oauth_nonce="{nonce_value}", \
oauth_signature="{oauth_signature_value}", oauth_signature_method="HMAC-SHA1",
oauth_timestamp="1468880095", oauth_token="{token_value}", oauth_version="1.0"' --verbose`
And part of the result that shows that it works fine:
< HTTP/1.1 200 OK
< content-disposition: attachment; filename=json.json
< content-length: 338
< content-type: application/json;charset=utf-8
< date: Mon, 18 Jul 2016 22:15:07 GMT
< server: tsa_a
< set-cookie: guest_id=v1%3A146888010738839623; Domain=.twitter.com; Path=/; Expires=Wed, 18-Jul-2018 22:15:07 UTC
< strict-transport-security: max-age=631138519
< x-access-level: read-write
< x-api-version: 1.0
< x-connection-hash: 70112d3f11846a9a9e8e26ff35b9b8ee
< x-content-type-options: nosniff
< x-frame-options: SAMEORIGIN
< x-rate-limit-limit: 300
< x-rate-limit-remaining: 299
< x-rate-limit-reset: 1468880167
< x-response-time: 386
< x-runtime: 0.375436
< x-transaction: 005843ea00b40159
< x-tsa-request-body-time: 0
< x-xss-protection: 1; mode=block
<
Connection #0 to host ads-api-sandbox.twitter.com left intact
{"data_type":"account","data":
{"name":"sandbox_account","timezone":"America\/Los_Angeles",
"timezone_switch_at":null,"id":"gq12f9","created_at":"2016-07-18T22:15:07Z","salt":"cf510daa05835fbb8d1370cc82e15889",
"updated_at":"2016-07-18T22:15:07Z","approval_status":"ACCEPTED",
"deleted":false},"request":{"params":{"name":"sandbox_account"}}}`