Environment Variables (.env) APIs

Raw MD
Manage bot environment variables, API secrets, and configuration keys securely.

1. Get Environment Variables (get_env)

Action: get_env
Parameters: bot_id
Returns a key-value dictionary of environment variables.

2. Set Single Variable (set_env_variable)

Action: set_env_variable or set_env_var
Parameters: bot_id, key, value

cURL Example
curl -X POST https://botlify.cloud/user_api.php   -H "X-API-KEY: YOUR_KEY"   -H "Content-Type: application/json"   -d '{
    "action": "set_env_variable",
    "bot_id": 14,
    "key": "PAYMENT_API_KEY",
    "value": "sk_live_9876543210"
  }'

3. Delete Variable (delete_env_variable)

Action: delete_env_variable
Parameters: bot_id, key