Error codes · Keys and signatures

Malformed signed request

Codemalformed_signed_request
Status400
If this was an orderBought nothing — an earlier copy may have: resume the same id
Send it again unchanged?No — change something first
.NET SDKAnisApiException

An earlier copy of this order may have gone through

This request bought nothing, but it was refused before Anis looked at the order, so it says nothing about an earlier attempt with the same operation id. Fix the cause first (restore access, or fix how the request is signed), then resume the same id (or read it with GET /orders/{operationId}). Never place it again under a new id.

What it means

The signed request is badly built: a signature header is missing or cannot be read, the signed parts are not the ones this route needs or not in their order, or the Content-Digest cannot be read or does not describe the body that was sent. Anis decides this before it looks at any key, so it says nothing about your key.

What to do

  • Run the signature self-check (check your signature) with the same signing code. If it is refused the same way, the fault is in how your code builds the signed request; if it passes, compare what it reports with the call that failed.
  • Rebuild the request over the exact bytes you send: both Signature and Signature-Input (label sig1), exactly the parts this route signs in their order (see Signing requests), and a Content-Digest of the body as sent — check that nothing between you and Anis changes the body.
  • Do not change your key: this refusal says nothing about it. Sending the same request again unchanged gets the same answer.
  • On an order: refused before Anis looked at the order, so it says nothing about an earlier attempt with the same operation id. Fix how the request is signed first, then resume the same id (or read it with GET /orders/{operationId}). Never place it again under a new id.

Where you can meet it

Example

The body of the refusal. Its type is the address of this page.

{
  "type": "https://developers.anis.ly/errors/malformed-signed-request",
  "title": "Malformed signed request",
  "status": 400,
  "code": "malformed_signed_request",
  "requestId": "01J9R2K8T4V6XQ0M3B7C5D9E1F"
}