Call Smart Contract from backend script without manually connecting to a wallet

Hi! New member here… I am working on a dApp that calls a Smart Contract function (in order to store data on-chain). The dApp does this automatically whenever it “requires” to. Obviously, I don’t want to approve each call to the Smart Contract manually, it needs to do this on the fly, without interruption (from within a server’s backend, either PHP or Python).

If I’m not mistaken (I’m fairly new to web3 development), I can call the web3.eth.personal.unlockAccount function for this purpose. But I’m not sure whether this is possible in a backend environment.

Another solution would be to use a hard-coded Private Key (in PHP or Python).

Does Infura offer a safe and reliable solution for this? Perhaps there’s a different way to achieve what I need?

Thank you!

hi @Roel018, Infura doesn’t store / maintain any private keys on your behalf, probably a good way would be to use an external vault called by your backed to read those keys.