Etherscan

Etherscan API API 密鑰無效

  • March 21, 2022

我在 etherscan 上創建了一個帳戶,導航到使用者面板中的 API 密鑰設置,並添加了一個密鑰。我轉到 API 文件,進行任何 API 呼叫,插入我的 API 密鑰,我得到一個無效的 API 密鑰響應。我是否需要將我的錢包連結到 etherscan,或通過其他一些驗證過程?我嘗試在 ropsten 和 mainnet 上創建新密鑰、幾個 API 端點,但它們都以相同的無效 API 密鑰響應失敗。

如果有其他資訊我可以提供,我很樂意提供。我能想到的唯一資訊是我的 API 密鑰。我嘗試了各種端點,這裡有兩個。

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

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

這裡的最終目標是驗證 ropsten 上的測試合約。

我有這個問題。API Key 創建後似乎需要大約五分鐘才能啟動。

我想我可能只是在計劃的維護時段內使用了 API。今天早上檢查了一下,一切都很好。

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

端點正在工作,我能夠使用驗證我的契約curl -d "address=MY_CONTRACT_ADDRESS" "https://api-ropsten.etherscan.io/api?module=contract&action=verifyproxycontract&apikey=MY_API_KEY"

引用自:https://ethereum.stackexchange.com/questions/98087