Metamask: Where does MetaMask keep the API key of Infura?
Februari 7, 2025 | by Gusri Efendi

Protect private keys with API keys: Understand Metamask’s relationship with Infura
When you use a blockchain portfolio based on Ethereum, like Metamask or Trust, to interact with the Infura platform, you mainly use their infrastructure to connect your portfolio to several APIs. More specifically, where Metamask stored the API key used for Authentication Infura?
In this article, we will deepen the details of how Metamask interacts with infura and will explore the implications of confidential information storage such as API keys in a portfolio.
The problem: private keys vs. Public keys
Private keys are digital keys that can only be used by the key owner to carry out specific actions on a blockchain network. On the other hand, public keys (or addresses) are publicly visible and can be shared or stored without compromising security. However, private keys are generally not exposed directly to users.
When you connect your wallet by Infura using Metamask, you create a new Ethereum account inside the platform. This process consists in storing an API key, used to authenticate its connection with the infu API.
Storage of API keys in Metamask
To store this confidential information safely, we must understand how it is really stored. Unfortunately, I did not find any direct documentation or official sources of Metamask explaining where the API keys are stored. However, based on several forums and discussions on the line, it seems that:
- Local storage : The API key is probably stored locally inside the wallet.
- Side Server Infura Storming: Some users have reported that Infura stores API keys in their server side storage, which is not accessible to the user.
Why store private keys in a portfolio?
Although storage of private keys in a wallet may seem against – at first, there are several reasons why it may be necessary:
- Safety : Private keys offer an additional safety layer, which makes it difficult to access or unauthorized falsification.
- Wallet Automy
: When storing confidential information locally, Metamask maintains user data control and can revoke access if necessary.
Conclusion
In conclusion, although it may seem unusual to store private keys in a portfolio, it is a common practice when using blockchain -based services like Infura. To alleviate security risks and maintain control, Metamask probably stores confidential information, such as locally in its infrastructure.
By interacting with Infura, users may be sure that the API key is safely stored on the user’s device, even if the real private key remains in a wallet.
Important note
Remember that storage of confidential information like API keys should never compromise security. Users must always follow best practices for safe keys and storage of cryptographic identification information.
RELATED POSTS
View all