Last week, we made progress with linking our initial React UI pages and figuring out how we're going to build our JS API.


This week, we aim to implement most of our API calls and further work on the React UI pages, with options to manage individual bots and edit them.

<aside> 🎯 **What are we looking to achieve?

  1. JS API implementations** We're aiming to get most of our functionality done first to ensure our solution can work before we start adding error handling.

2. Rework the upload page file input The input should only accept certain files, make relevant calls to our business logic API, and have some UX features like a progress bar to give feedback to the user.

3. Add pages to manage individual bots We need to have the ability to remap bots to different numbers, and delete them entirely.


Implementing the API calls

Based on the functionality we wanted our application to have, we knew what core API calls we would need. We've outlined these previously when defining the interface between our frontend and business logic.

For recap, this included methods to:

We initially had a lot of trouble getting our http requests to Twilio to work - we kept getting different status code errors.


var contentType = "application/json"
var contentOpts = {
	filename: "mapping.json",
	contentType: contentType

form = new FormData();
form.append('Path', "mapping.json");
form.append('Visibility', "private");
form.append('Content', JSON.stringify(mapping), contentOpts);

await, form, {
	auth: {
		'user': client.accountSid,
		'pass': client.password