IBM Cloud Docs
Are you getting a binding_error code when you make a cURL API request?

Are you getting a binding_error code when you make a cURL API request?

If you use single quotes in an API request, the request fails with a binding error.

The API request fails and the response returns a binding error.

When you use single quotes in the header of a cURL request, for example, -H 'Authorization: $ACCESS_TOKEN' -H 'content-type: application/json', you can get the binding_error problem.

{"trace":"70684768-53ae-476f-bec7-2d923bb5f14c","errors":[{"code":"binding_error","message":"The input parameters in the request body are either incomplete or in the wrong format. See detailed error: invalid character 'n' looking for beginning of object key string."}]}curl: (6) Could not resolve host: COS
curl: (6) Could not resolve host: target
curl: (3) [globbing] unmatched close brace/bracket in column 389

Check the header in your cURL request is set with double quotes.

-H "Authorization:  $ACCESS_TOKEN"   -H "content-type: application/json"