API Key
caution
All requests to Arkhia APIs require an API key to be attached in the path or the header of the request for authentication
Using the Arkhia dashboard, you can access your API key on the project details page, under the security section.
How to add the API key to a request?
- REST API
- JSON RPC
- STATUS API
# The API Key needs to be passed in the header for Rest API requestscurl --location 'https://<YOUR_BASE_URL>/hedera/mainnet/api/v1/blocks' \--header 'x-api-key: <YOUR_API_KEY>'
# The API Key needs to be passed in path for JSON RPC requestscurl --location 'https://<YOUR_BASE_URL>/hedera/mainnet/json-rpc/v1/<YOUR_API_KEY>' \--header 'Content-Type: application/json' \--data '{ "jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 0}'
# The API Key needs to be passed in path for Arkhia Status API requestscurl --location 'https://<YOUR_BASE_URL>/arkhia/service/status/<YOUR_API_KEY>'