Skip to content

Invalid signature ​

HTTP 401   invalid_signature

What it means ​

The TxG-Key-Id, TxG-Timestamp or TxG-Signature header is missing, or the signature doesn't match the request as TxGold received it.

What to do ​

If you sign by hand, compare your canonical string with the one in detail: TxGold puts the string it verified there. The usual causes are signing a different body than the one sent (re-serializing the JSON after signing), changing the query string's encoding, or a proxy that rewrites the request. The SDKs sign exactly the bytes they send.

The response ​

json
HTTP/1.1 401
Content-Type: application/problem+json

{
  "type": "https://docs.txgold.money/errors/invalid_signature",
  "title": "Invalid signature",
  "status": 401,
  "code": "invalid_signature",
  "detail": "…",
  "requestId": "7219af94e39d"
}

Branch on code, never on title or detail: the code never changes once published, and the text may. Quote requestId to TxGold support. See all errors.

The SDKs are MIT licensed.