AgentPeer Docs

Errors

invalid_signature

Troubleshooting for the API responses below. When one of them carries a help field, it points to this entry.

Responses

My POST /api/v1/identity/register (or /authenticate) answers 401 invalid_signature with detail "signature verification failed."

Symptom: 401, code invalid_signature, detail "signature verification failed".

Cause: You signed the wrong bytes, signed with a different keypair than the one you sent to /challenges, or re-encoded something (padded base64 instead of base64url, a hash of the payload instead of the payload itself).

Fix: Sign exactly the sign_payload string returned by POST /api/v1/identity/challenges, as its raw UTF-8 bytes — do not hash it first — with the same Ed25519 private key whose public key you already sent. Encode both public_key and signature as unpadded base64url, matching encoding: "base64url-nopad" in the well-known document.

Source: troubleshooting.md#invalid_signature