API Keys

What is API Key?

API Key is an authentication mechanism used to protect the SanScan API service from unauthorized access. It is a unique string generated by the system, assigned to each user for authentication during API calling. Users need to include the API Key in the header of their requests to authenticate their identity.

Why does SanScan need API Key?

API Key is a security mechanism that ensures only authenticated users can access our API service, protecting the system from malicious attacks and abuse.

Get an API Key

In the system, each user can obtain unique API Keys for authentication when calling the SanScan API service. Users can obtain an API Key by following these steps:

1. Log in to the system and go to the API Keys page
2. Go to API MANAGEMENT , Click on Generate OTP, an one time password goes to your registered email.than create api key for your APP.
3. Copy the generated API Key token to your application to authenticate your identity when calling the SanScan API service.

IP Whitelist

Why IP whitelist?

Security

IP whitelisting helps protect your API from unauthorized access by allowing only specific, trusted IP addresses to connect. This is particularly important for sensitive APIs or APIs that handle confidential data

Access Control

It provides fine-grained access control. You can specify which clients or systems are allowed to use your API by specifying their IP addresses. This is useful for controlling who can access your API and who cannot.

Mitigating Unauthorized Access

Even if someone obtains API credentials (such as API keys or tokens), IP whitelisting can prevent them from using those credentials from unapproved locations.

Reducing Attack Surface

By limiting the IP addresses that can access your API, you reduce the potential attack surface and minimize the risk of exposure to malicious actors.

Compliance

In some industries, regulatory requirements or internal policies may mandate IP whitelisting as a security control to protect sensitive data.
While IP whitelisting provides security benefits, it's essential to use it judiciously and in combination with other security measures. Here are some considerations:

2. Go to API MANAGEMENT => IP WHITELIST , Click on Generate OTP, an one time password goes to your registered email.Than enter your IP address.

Address

Generate SAN20 Address

https://evapro.info/api/developer/generate_address

REQUEST METHOD : POST

curl --location 'https://evapro.info/api/developer/generate_address' \
--header 'auth-key: ***********************************' \
--form 'name="user12"'
                                        

Generate Addresses for receiving tokens

SAN20 Address USDC Balance

https://evapro.info/api/developer/address_balance

REQUEST METHOD : POST

curl --location https://evapro.info/api/developer/address_balance' \
--header 'auth-key: bid1vXAR2CykrP354QgSIGJUTOaulfmZY06' \
--form 'address="SMyWR8OnjIs7vL0O1uIDRcSJYR7dc8JIRGyPZRks0Y"'
                                        
{"status":"success","message":"Account Matched","balance":20}

Transactions

Transfer USDC Token to another address

https://evapro.info/api/developer/transfer

REQUEST METHOD : POST

Query Parameters

Parameter Description
to required
amount required
 
curl --location https://evapro.info/api/developer/transfer' \
--header 'auth-key: bid1vXAR2CykrP354QgSIGJUTOaulfmZY06' \
--form 'to="Sw299veU6JoARk5A3c0EPl0sYV78Y7BUU4xVboIJbM"' \
--form 'amount="3"'
                                        
 
{
    "status": "success",
    "message": "transferred"
}    

Address Transactions

https://evapro.info/api/developer/address_transactions

REQUEST METHOD : POST

Query Parameters

Parameter Description
address the string representing the addresses to check for balance
page the integer page number, if pagination is enabled
offset the number of transactions displayed per page
sort the sorting preference, use asc to sort by ascending and desc to sort by descending
 curl --location 'localhost:8000/api/developer/address_transactions' \
--header 'auth-key: {authKey}\
--form 'address="SC6aUikkxe0r2EyevEoYFWJr0XtZN9xHhofQ6oi3SJVPEBl5bT6M34Y1P0U4PP5YIZu"'
{
    "status": "success",
    "message": "Account Matched",
    "balance": 20,
    "transactions": [
        {
            "from": "SC6aUikkxe0r2EyevEoYFWJr0XtZN9xHhofQ6oi3SJVPEBl5bT6M34Y1P0U4PP5YIZu",
            "to": "SmxeUZCqApXRnwrWdYopY2gjciQmk9yLR5FkjMRlj9",
            "transaction_id": "Cqpoz2kXwPXAmyDqvXFODn00lJEfIcGch2JhmeK1TLlEmUfq3AaG36Tg7iXHQUnFrY46al3",
            "block_timestamp": 1692694091,
            "type": "Receive",
            "value": 20,
            "created_at": "2023-08-22 14:18:11"
        }
    ]
}