HMAC Request malformed

I want to create a new API with the request:

curl -H “x-tyk-authorization: 352d20ee67be67f6340b4c0605b044b7”
-s
-H “Content-Type: application/json”
-X POST
-d ‘{
“name”: “Test API hmac”,
“slug”: “test-api hmac”,
“api_id”: “2",
“org_id”: “53ac07777cbb8c2d53000002”,
“enable_signature_checking”: true,
“use_basic_auth”: false,
“use_keyless”: false,
“use_oauth2”: false,
“auth”: {
“auth_header_name”: “date"
},
“definition”: {
“location”: “header”,
“key”: “x-api-version”
},
“version_data”: {
“not_versioned”: true,
“versions”: {
“Default”: {
“name”: “Default”,
“use_extended_paths”: true
}
}
},
“proxy”: {
“listen_path”: “/test-api/”,
“target_url”: “http://httpbin.org/”,
“strip_listen_path”: true
},
“active”: true,
“domain”: “”
}’
http://10.0.127.10:8080/tyk/apis/ | python -mjson.tool

I got:
{
“error”: “Request malformed”,
“status”: “error”
}

I checked the format and i don´t found the error.

This might be the curl command messing with the data being sent.

Move the body data into a file and then send it using the @ delimiter instead.

Thanks Martin, i had a error whit a colon :frowning:

1 Like