import freshcom from 'freshcom-sdk'
let password = 'supersecurepassword'
freshcom.createAndSetAccessToken({
fresh_token: 'prt-test-aba1d92c-defb-478e-a031-40b5c27171c7',
grant_type: 'refresh_token'
return freshcom.createCustomer({
}).then(function(response) {
let customer = response.data
// Keep the customer somewhere for later use...
// Log in the customer by its password.
return freshcom.createAndSetAccessToken({
scope: 'aid:aid-test-5e9240ff-0885-4327-a1e7-f46f3fdb3f74',