0

I created an account on etherscan, navigate to the API Keys settings in the user panel, and added a key. I go to the API documentation, take any API call, insert my API key, and I get an invalid API key response. Do I need to link my wallet to etherscan, or go through some other verification process? I have tried creating new keys, several API endpoints on ropsten and mainnet, and they all fail with the same Invalid API key response.

If there is some other information I can provide, I would be happy to. The only information I can think of is my API key. I have tried various endpoints, here are two of them.

https://api.etherscan.io/api?module=transaction&action=getstatus&txhash=0x15f8e5ea1079d9a0bb04a4c58ae5fe7654b5b2b4463375ff7ffb490aa0032f3a&apikey=YourApiKeyToken

https://api.etherscan.io/api?module=stats&action=ethsupply&apikey=YourApiKeyToken

The end goal here is to verify a test contract on ropsten. I started looking at this and thought it was the truffle-verify plugin, and commented at this issue -

https://github.com/rkalis/truffle-plugin-verify/issues/16

but now I'm thinking its the etherscan API, or maybe incorrect configuration of my account prior to generating my API key? Any help would be appreciated. Link to my repository is on the issue comment, but I will put it below as well. Issue is seen on most recent commit on upgradeable-karma branch.

https://gitlab.com/shaunrd0/karma/-/tree/upgradeable-karma

2

I think I may have just been using the API during a scheduled maintenance window. Checking things this morning and everything is fine.

https://info.etherscan.com/psa-scheduled-server-maintenance-and-upgrades-1st-may-2020-1-30-am-gmt-0/

Endpoints are working, and I Was able to verify my contract using curl -d "address=MY_CONTRACT_ADDRESS" "https://api-ropsten.etherscan.io/api?module=contract&action=verifyproxycontract&apikey=MY_API_KEY"

0

I had this problem. The API Key seems to take about five minutes to activate once it is created.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.