Skip to main content

EASY API CLI options

Options

OptionTypeDescription
--no-apibooleanDon't expose the api. This may be useful if you just want to set the webhooks. (default: false)
--bot-press-urlstringThe Botpress URL that ends with your bot id.
--twilio-webhookstringSend twillio payloads to this URL. EASY API will also parse and processes twillio response message payloads.
--chatwoot-urlstringThe URL of the specific Chatwoot inbox you set up for this session
--chatwoot-api-access-tokenstringThe access token of the specific Chatwoot inbox you set up for this session
--force-update-cw-webhookbooleanUpdates the chatwoot inbox webhook with the --api-host value on every launch (default: false)
--portnumberSet the port for the api. Default to 8002. (default: 8002)
--forcePortnumberSometimes --port is overridden by environmental variables or the config file. Use this flag to force the port to be used.
--api-hoststringThe easy API may be sitting behind a reverse proxy. In this case set --api-host in order to make sure the api docs and api explorer are working properly. You will need to include the protocol as well.
--hoststringSet the hostname for the api documantation and statistics. Overrides --api-host. Default: localhost. (default: localhost)
--webhookstringWebhook to use for the listeners.
--verbosebooleanEnable console transport for internal logger. (default: false)
--evstringSend launch events to this URL.
--efstringFilters which namespaces trigger the webhook set in -e/--ev. (default: qr,STARTUP,MD_DETECT,qrUrl)
--allow-session-data-whbooleanBy default, if you set -e flag, the session data is not transferred to the webhook as it is extremely sensitive data. In order to bypass this security measure, use this flag. (default: false)
--keystringSpecify an api key to use as a check for all requests. If you add -k by itself, a key will be autogenerated for you.
--configstringThe relative json file that contains the config. By default the system will look for cli.config.json which will override any config variables set. Default: './cli.config.json'.
--sessionstringA base64 string representing the session data.
--keep-alivebooleanIf true, the system will force the session to refocus in this process. This will prevent you from opening a session elsewhere.
--use-session-id-in-pathbooleanIf true, all API paths will include the session id. default to false and the default session Id is 'session'.
--generate-api-docsbooleanGenerate postman collection and expose api docs to open in browser. (default: true)
--session-data-onlybooleanKill the process when the session data is saved. (default: false)
--skip-save-postman-collectionbooleanDon't save the postman collection. (default: false)
--headfulbooleanShow the browser window on your machine. (default: false)
--pre-auth-docsbooleanPre authenticate documentation site [High security risk].
--statsbooleanExposes API swagger-statistics. (default: false)
--pre-auth-docsbooleanGrab config options from the environment variables. (default: false)
--no-kill-on-logoutbooleanKeeps the process alive when host account logs out of session. default is false (default: false)
--debugbooleanPrint out the CLI flag values and the WA_* env vars. default is false (default: false)
--corsbooleanEnable all cors requests (default: false)
--socketbooleanExpose a socket.io middleware on the server. (default: false)
--license-keystringThe license key you want to use for this server. License keys are used to unlock features. Learn more here https://github.com/open-wa/wa-automate-nodejs#license-key
--ready-webhookstringWebhook that fires when the EASY API is completely ready
--on-callstringA default message to send to any number that is trying to call the host account
--auto-rejectbooleanAutomatically reject incoming phone and video calls to the host account.
--emit-unreadbooleanEmit all unread messages via onMessage webhooks on launch. (default: false)
--skip-url-checkbooleanDon't validate webhook URLs. Enables use of non-FQDNs.
--tunnelbooleanExpose a tunnel to your EASY API session - this is for testing and it is unsecured. By default it will use a random cloudflare tunnel URL. Make sure you have cloudflared installed and running.
--cf-tunnel-host-domainstringIf you have a domain set up in a cloudflare account and have run cloudflared login on your machine, you can use this to expose the tunnel on your own domain. For example, if you set --cf-tunnel-host-domain mycool.site, the tunnel will be exposed on https://session_id_owa.mycool.site
--cf-tunnel-namespacestringYou can set a sub-subdomain namespace on which the tunnel will be exposed. Needs to be set in conjunction with --tunnel & --cf-tunnel-host-domain. For example, if you set --cf-tunnel-namespace owa, the tunnel will be exposed on https://session_id.owa.mycool.site
--pm2booleanOffload the EASY API to local instance of pm2. You can add pm2 specific arguments also if you want.
--privkeystringThe private key to use for the TLS connection. --cert is also required
--certstringThe certificate to use for the TLS connection. --privkey is also required
--helmetbooleanEnable helmet middleware for security.
--allow-ipsstringAllow only these IPs to connect to the EASY API. By default, all IPs are allowed.
--helpPrint this usage guide.