Send requests
This section covers how to use your query key to access Chain.Love API services.
Use Your Query Key
There are several ways to include your query key in your requests:
Not including it at all: Chain.Love provides rate-limited endpoints on several networks for free, without a need for prior authorization. Learn more: BLOCKCHAINS
Using the Authorization header: "Authorization: Bearer QUERY_KEY"
curl https://<network>.chain.love \
-X POST \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer QUERY_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'wscat -c wss://<network>.chain.love/ws \
-H "Authorization: Bearer QUERY_KEY" \
-x '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'Using the token query parameter: ?token=QUERY_KEY
curl https://<network>.chain.love?token=<QUERY_KEY> \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'wscat -c wss://<network>.chain.love/ws?token=QUERY_KEY \
-x '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'Troubleshooting
There are a few things to keep in mind when sending requests to Chain.Love API:
If you are using the token query parameter, make sure to encode the query key in the URL.
If you are getting a 401/403 errors, make sure you are using the correct query key.
If you are getting a 429 error, you've reached your rate limit. It might be a specific "soft" limit of your key, or a "hard" limit of your account. Either patch a key or upgrade your subscription to increase your rate limit. Refer to the Subscriptions page for more information.
If you are getting a 500 error, it could be a server error, normally this should never happen. Please, contact us for further assistance.
Last updated