If I run algod, I see something like: Node running and accepting RPC requests over HTTP on port 127.0.0.1:8080. Press Ctrl-C to exit
However, when I try something like: http://127.0.0.1:8080/v2/assets/312769, I see {"message":"Invalid API Token"}. What API token am I supposed to use and where do I put it when I am sending this request?
If I send a request like: http://127.0.0.1:8080/genesis, I am able to receive back a response, but any request I send to get an account or asset info, I see the “invalid api token”… Any help would be appreciated.
Under your node/data folder, you should be able to find a algod.token file, the content will be the token you need to pass in the header’s X-Algo-API-Token field.
If you pass the first parameter algod_token as empty string, and pass the headers too, your token will be overwritten by the algod_token value, which in your case, it will be an empty string again.