API #
The API application has various environment variables required for it to function, these are explained here.
Database #
DB_HOST: The IP of the Postgres database. Defaults to 172.17.0.1
DB_USERNAME: The username given to the Postgres user created when the database is first initialised. Defaults to yoto-messenger-api-user
DB_PASSWORD: The password given to the Postgres user. This should be secure password.
DB_DATABASE: The name of the database that is created when container is first initialised. Defaults to yoto-messenger
DB_PORT: The port the database will run on. Defaults to 5432
API Auth #
JWT_SECRET: This is the secret that is used to encrypt the JWT Token created when a user logs into the API via the web app. This should be a random string. Defaults to secret.
Whats App #
WHATS_APP_WEBHOOK_VERIFY_TOKEN: The random token that matches the one entered into the WhatsApp API configuration and is used to verify the WhatsApp webhook URL. See the Setup WhatsApp Web Hook page for more details on this. Defaults to secret.
WHATS_APP_AUTH_TOKEN: The auth token generated in your WhatsApp API account. See the Whats App API setup guide for details on this.
WHATS_APP_PHONE_NUMBER_ID: The ID of the WhatsApp API phone number. See the WhatsApp API Guide for where to find this.
Yoto #
YOTO_MQTT_URL: The URL to use to listen for MQTT events that come from the Yoto devices. Defaults to wss://aqrphjqbp3u2z-ats.iot.eu-west-2.amazonaws.com
YOTO_MQTT_AUTH_NAME: The Auth name used when connecting to the MQTT stream. Defaults to =JwtAuthorizer_mGDDmvLsocFY
YOTO_CLIENT_ID: An ID specific to you that grants you access to the Yoto API. See the Yoto API Guide for details on how to get this.
Grafana #
Grafana integration for logging is optional so you can leave these entries blank if you're happy with basic console logging.
GRAFANA_HOST: Your account's logging host URI.
GRAFANA_USER_ID: Your Grafana User ID
GRAFANA_TOKEN: Your Grafana logging token.
App Configs #
The app's behaviour can be customised with the following variables.
ENABLE_EMOJI_SENDING: Setting this to true allows users to send emojis to their account members via the Yoto by playing the special tracks that are added. If set to false these tracks won't be added and the feature will be disabled. Defaults to true.