Invalid API Token

I updated the CLI on my raspberry pi and now I keep getting Invalid API Token:

pi@raspberrypi:~/node $ ./goal -d ~/node/mainnetdata asset freeze --account $ACCOUNT --assetid <asset_id> --freezer <creator_address> --freeze=true -o freeze.txn
Cannot determine last valid round: Unauthorized request to `http://127.0.0.1:8080/v1/transactions/params` when using token `e1abb2...28fa` : {"message":"Invalid API Token"}

I can start the node just fine:

pi@raspberrypi:~/node $ ./goal node start -d ~/node/mainnetdata
Algorand node was already started!

But running basically anything else gives me this:

pi@raspberrypi:~/node $ ./goal node status -d ~/node/mainnetdata
Cannot contact Algorand node: Unauthorized request to `http://127.0.0.1:8080/v2/status` when using token `e1abb2...28fa` : {"message":"Invalid API Token"}

Where are you getting the token? From your node or are you using PureStake? If you’re not already using PureStake - I may try using a PureStake API Token.

PureStake Link

try using Purestake as he said bro

I cant find any documentation on how to set a Purestake key in the Linux CLI to run goal commands, nor have I had to for the last 8 months while running this node. not sure what Im missing here.

I may try using the Python or JavaScript SDK. I’ve been able to use the Purestake key with them and I’ve had troubles working with goal. The connection for the Python-SDK looks like this:

algod_address = "https://testnet-algorand.api.purestake.io/ps2"
algod_token = ""
headers = {"X-API-Key": algod_token }
algod_client = algod.AlgodClient(algod_token,algod_address,headers)

So a recent Algorand Linux CLI client update now requires API configuration but there’s no documentation on it? that’s what it seems like to me, I want to keep using these shell scripts but theyre useless until I can figure out how to configure API calls happening under the hood

Apologies, I don’t know anything about the Linux CLI. Best of luck on solving this!

I found that ./goal commands are requiring API authentication, but by switching my shell scripts to use goal client (without API token setting), my commands work as expected…weird.

It looks like you have installed twice the algorand software. Once globally goal, and once locally ./goal.
My guess is that these two versions are different and somewhat incompatible.

I would recommend removing the second installation.