API Secret
API Secret is an additional security measure that you can choose to enforce on all your API requests. After activating the setting on the dashboard you will have to add an additional key in the body of each request.
caution
Once the API secret is enforced for a project. All API requests made using that projects API Key will require API Secret to be sent in the body of the request
tip
We recommend enabling API secret for additional security for production applications. Especially if you are using a service that requires you to send the API Key in path of the request, as the chances of your API Key getting compromised are high
- REST API
- JSON RPC
- STATUS API
# If activated, the API secret needs to be passed in the header of the requestcurl --location 'https://<YOUR_BASE_URL>/api/v1/blocks' \--header 'x-api-key: <YOUR_API_KEY>' \--header 'x-api-secret: <YOUR_API_SECRET>'
# If activated, the API secret needs to be passed in the header of the requestcurl --location 'https://<YOUR_BASE_URL>/json-rpc/v1/<YOUR_API_KEY>' \--header 'Content-Type: application/json' \--header 'x-api-secret: <YOUR_API_SECRET>' \--data '{ "jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 0}'
# If activated, the API secret needs to be passed in the header of the requestcurl --location 'https://<YOUR_BASE_URL>/arkhia/service/status/<YOUR_API_KEY>'--header 'x-api-secret: <YOUR_API_SECRET>'