if(not client.is_opted_in()):
print('Account not opted into app, opting in now..')
transaction_group = client.prepare_app_optin_transactions()
transaction_group.sign_with_private_key(account['address'], account['private_key'])
result = client.submit(transaction_group, wait=True)
Can you please provide the full error message as well as a full minimum example exhibiting the issue?
(Full minimum example is a code that you shrink as much as possible while keeping the error.)
PS: I’ve fixed formatting of your post to have the code between triple backquotes ```
the minimum code was provided, becaause the rest of the code include my private keys.
The error I get Is an HTTP ALGOD ERROR, whne I try to opt in into Tinyman from the wallet
Indeed, don’t include the secret keys, but sometimes it helps to show the full code where you replace the private keys and tokens by some stars.
In this case, the error was sufficient for the debug:
your account is empty: you need some Algos to opt-in.
If you’re on MainNet, you need to buy some Algos.
If you’re on TestNet, you need to use the dispenser.
If you already did the above (and checked the balance on a block explorer such as algoexplorer.io) and still have the above issue, the most likely reason is that your node is not synced.
Yes, I checked all. Would you mind helping to make the node sync?
Which node and network are you using?
Can you copy-paste the code initializing the client without the token?
Have you looked at Overspend account - #6 by fabrice and Synchronize sandbox data when switched to new computer - #4 by fabrice?