...
Chatbot Configuration File
While on the code root folder, navigate to MoodleBot > appsettings.json. The following are some of the most important parameters to configure.
Info |
---|
You will need to adquire an activate a WhatsApp number with Twilio, a messaging provider |
TwilioNumber: chatbot telephone number. Users have to write a message to this number to start the conversation. All numbers need to have the following format: whatsapp:<telephone number>.
Code Block "TwilioNumber": "whatsapp:+447862143841",
TwilioAccountSid: can be found in the Twilio console dashboard, in the ‘Account info’ section.
TwilioAuthToken: can be found in the Twilio console dashboard, in the ‘Account info’ section.
TwilioValidationURL: this URL hast to be the same you use as the webhook URL for incoming messages on Twilio (read why here). Remember, the webhook URL has to point to the port 3979 of the server where the chatbot is hosted.
Code Block "TwilioValidationUrl": "http://<host>:3979/api/twilio",
Moodle.AuthToken: authentication token, used to consume Moodle’s API.
Moodle.MoodleAPI.BaseUrl: Moodle instance URL for all API calls.
Code Block "BaseUrl": "https://<host>/webservice/rest/server.php?moodlewsrestformat=json",
Info |
---|
You will find many more parameters already pre-populated (e.g., ActivityPageSize to configure how many Moodle activities the user will see in a single WhatsApp message), you can leave everything as it is for now. |
...