forked from code-chat-br/whatsapp-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.env
78 lines (68 loc) · 2.71 KB
/
dev.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Choose the server type for the application
SERVER_TYPE='http' # https
SERVER_PORT=8080 # 443
CORS_ORIGIN='*' # Or separate by commas - ex.: 'yourdomain1.com, yourdomain2.com'
CORS_METHODS='POST,GET,PUT,DELETE'
CORS_CREDENTIALS=true
# Install ssl certificate and replace string <domain> with domain name
# Access: https://certbot.eff.org/instructions?ws=other&os=ubuntufocal
SSL_CONF_PRIVKEY='/etc/letsencrypt/live/<domain>/privkey.pem'
SSL_CONF_FULLCHAIN='/etc/letsencrypt/live/<domain>/fullchain.pem'
# Determine the logs to be displayed
LOG_LEVEL='ERROR,WARN,DEBUG,INFO,LOG,VERBOSE,DARK'
LOG_COLOR=true
# Determine how long the instance should be deleted from memory in case of no connection.
# Default time: 5 minutes
# If you don't even want an expiration, enter the value false
DEL_INSTANCE=5
# Temporary data storage
STORE_CLEANING_TERMINAL=7200 # seconds ===2h
STORE_MESSAGE=true
STORE_CONTACTS=false
STORE_CHATS=false
# Permanent data storage
DATABASE_ENABLED=false
DATABASE_CONNECTION_HOST='<host>'
DATABASE_CONNECTION_PORT='<port>'
DATABASE_CONNECTION_USER='<user>'
DATABASE_CONNECTION_PASSWORD='<pass>'
DATABASE_CONNECTION_DB_PREFIX_NAME='codechat'
DATABASE_SAVE_DATA_INSTANCE=false
DATABASE_SAVE_DATA_OLD_MESSAGE=false
DATABASE_SAVE_DATA_NEW_MESSAGE=true
DATABASE_SAVE_MESSAGE_UPDATE=true
DATABASE_SAVE_DATA_CONTACTS=true
DATABASE_SAVE_DATA_CHATS=true
# Webhook Settings
## Define a global webhook that will listen for enabled events from all instances
WEBHOOK_GLOBAL_URL='<url>'
WEBHOOK_GLOBAL_ENABLED=false
## Set the events you want to hear
WEBHOOK_EVENTS_STATUS_INSTANCE=true
WEBHOOK_EVENTS_QRCODE_UPDATED=true
WEBHOOK_EVENTS_MESSAGES_SET=true
WEBHOOK_EVENTS_MESSAGES_UPDATE=true
WEBHOOK_EVENTS_MESSAGES_UPSERT=true
WEBHOOK_EVENTS_SEND_MESSAGE=true
WEBHOOK_EVENTS_CONTACTS_SET=true
WEBHOOK_EVENTS_CONTACTS_UPSERT=true
WEBHOOK_EVENTS_CONTACTS_UPDATE=true
WEBHOOK_EVENTS_PRESENCE_UPDATE=true
WEBHOOK_EVENTS_CHATS_SET=true
WEBHOOK_EVENTS_CHATS_UPSERT=true
WEBHOOK_EVENTS_CHATS_UPDATE=true
WEBHOOK_EVENTS_CONNECTION_UPDATE=true
## This event fires every time a new token is requested via the refresh route
WEBHOOK_EVENTS_NEW_JWT_TOKEN=true
CONFIG_SESSION_PHONE_CLIENST='codechat'
CONFIG_SESSION_PHONE_NAME='Chrome'
# Set qrcode display limit
QRCODE_LIMIT=6
# Defines an authentication type for the api
AUTHENTICATION_TYPE='jwt' # or 'apikey'
## Define a global apikey to access all instances
### OBS: This key must be inserted in the request header to create an instance.
AUTHENTICATION_API_KEY='t8OOEeISKzpmc3jjcMqBWYSaJsafdefer'
## Set the secret key to encrypt and decrypt your token and its expiration time
AUTHENTICATION_JWT_EXPIRIN_IN=3600 # seconds - 3600s ===1h | zero (0) - never expires
AUTHENTICATION_JWT_SECRET='L0YWtjb2w554WFqPG'