Nexus

Algorand "should have been authorized by ... but was actually authorized by" error

Short answer: The transaction was signed with a key that does not control the sender address.

What the node printed

Pattern:

transaction <TXID>: should have been authorized by <EXPECTED_ADDRESS> but was actually authorized by <SIGNER_ADDRESS>

Captured verbatim from a testnet node on 2026-12-03:

transaction W2WU4PF2HFPFBL76Q7K3HWSXLLP7GUYSJCB3NWGD63MIBCFDKNCQ: should have been authorized by I7UPLJPMKA67GCEXWW4EVGPS5MUOROAIRD4FMV4DCGUGCQLVNRJTSDHJFU but was actually authorized by LP6YOM6CQ2X65SJRRMLWVITLYTGGGNERYIOXJRTDTZP2O5PQWIL6KERJVI

Why it happens

The capture signed a transaction from address A with the key of address B, and the node printed both addresses: the one that should have signed, and the one that did. A rekeyed account behaves the same way: its spending key is the auth address, not its own key.

How to fix it

const stxn = txn.signTxn(senderAccount.sk); // must be the SENDER's key (or its auth-addr key if rekeyed)

Method: this message was produced on purpose against a live testnet node (https://testnet-api.algonode.cloud) on 2026-12-03. Message wording can change between node versions. All errors: index · errors.json.