The API settings tab allows the user to generate, regenerate or disable the following API related settings:-
Auth Token
Private Salt
IP whitelisting
Click on Account on your homepage
Click on Settings to land on the API settings page
By default, APIs are deactivated for every account and have to be manually activated.
To activate/generate API credentials - press the “Enable API” button
This will generate the following 2 API credentials:-
Auth Token
Private Salt
Auth token is the unique identifier that lets Leegality validate the API calls. The Auth Token needs to be passed in the X-Auth-Token header parameter while making API calls (refer to API documentation).
The user can copy the Auth Token to their clipboard by pressing the “Copy” icon.
Note: Auth tokens are account-specific and each Leegality account has its own unique Auth Token.
Auth Tokens can be regenerated in 2 ways:-
Press the “Regenerate button next to the Auth Token field.
Note: Regenerating an Auth Token does not regenerate the Private Salt for that account.
In case API is disabled and enabled again.
Private salt can be used to verify the webhook calls made by Leegality.
To verify the webhook calls made by Leegality using Private Salt, refer to the ‘mac’ parameter in our webhook documentation.
Private Salt can only be regenerated by disabling and enabling the API.
The user can copy the Auth Token to their clipboard by pressing the “Copy” icon.
The user can enable IP whitelisting which will restrict IP addresses that can make API calls to Leegality.
Note: You can add 10 IPs to this list.
To add an IP follow these steps:-
Toggle on “Whitelist IPs”
Enter a valid IPv4 address and press the “Add+” button.
Note: The IP address needs to be input in x.x.x.x format - where the value of x can range from 0-255.
In order to delete an IP address - Click on the cross icon next to an existing IP
In case IP whitelisting is disabled, all the saved IP addresses will be lost.
In order to disable the API access for an account - simply click on the “Disable API” button and the associated token and salt will be deleted by Leegality.