API key secret
Enforce additional security by requiring an API key secret for all requests.

Add the project secret to requests

HTTPS
WebSocket
curl --user :<YOUR-PROJECT-SECRET> \
https://mainnet.infura.io/v3/<YOUR-API-Key> \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
wscat -c wss://mainnet.infura.io/ws/v3/<YOUR-API-KEY> --auth ":<YOUR-PROJECT-SECRET>"
> {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}
Last modified 5d ago
Copy link