Skip to content

UtkuKaanArasan/aircall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aircall

This is a solution for Aircall

How to run the app

  1. Clone the app from github
  2. Install the dependendcies using "npm install"
  3. Create a file named "access_token" in the directory of /src
  4. Paste this code to the file => const access_token: string = 'Your access key';
    export default access_token;
  5. Run the authentication code written down below (Run it using node)
  6. You will get access token, paste the access token to access_token variable inside 'Your access key' (step 4)
  7. Run 'npm start' in terminal
  8. The app now runs!

Authentication code

  // Install axios using => npm install axios
  
const axios = require('axios').default;

  axios.post("https://frontend-test-api.aircall.io/auth/login",
    {
        username: "userName",
        password: "password"
    })
    .then((res) => console.log(res.data))
    .catch((err) => console.log(err))

Run this code in any javascript file you want my recommendation is create a file then run it using node

Note that access token is valid only 10 minutes so you need to run this code and get access token every 10 minutes