Message not found

I tried to manually build and submit a transaction to the node but got this error {'message': 'Not Found'}.

code for reference

import base64

import requests
from algosdk.encoding import msgpack_encode
from algosdk.future.transaction import PaymentTxn, SuggestedParams
from algosdk.util import algos_to_microalgos

key0 = "wf6MGq9+IOzzOKpVIGjZiwaHsEA51FFqM3vt8TRdNVJUEZ23cYux3hBE+2MhrLFN4ezLa1osSa9YT63j1bP5zg=="


d = requests.get("")
f = d.json()
params = SuggestedParams(
            f["last-round"] + 1000,

txn = PaymentTxn(acc0, params, acc1, algos_to_microalgos(1), note="")
stxn = txn.sign(key0)
encoded = base64.b64decode(msgpack_encode(stxn))

header = {"Content-Type": "application/x-binary"}

send ="{encoded}", headers=header)


One issue is the following:

You need to post the transactions to the endpoint as the body of the POST.
Not include the transactions in the URL, as the code

send ="{encoded}", headers=header)


In general, we strongly recommend using the SDK to send the requests, rather than manually doing it. You can find a full example there: Your First Transaction - Algorand Developer Portal

If you cannot use the SDK, please let us know why and also please indicate which “requests” JS library you are using.

Hello Fabrice, Happy New Year. I was reworking the backend code for Mint Engine and we are trying to do away with the need for x-api-keys (hope this isn’t a bad thing).

I am using the python requests lib pip install requests.

Thanks for your feedback, I’ve fixed the error.

1 Like

This is ok not requiring them depending on your use case.
However, the SDK does not require them either.

See for example:

from algosdk.v2client import algod

algod_address = ""
algod_token = ""

algod_client = algod.AlgodClient(algod_token, algod_address)

I didn’t know this🤦. Thanks, thanks alot🙇

but the documentation used purestake api, which is why I thought it was enforced by the sdk