Error in index.js, where converApi.auth is not defined.?

129 Views Asked by At

While running the below code

let convertApi = ConvertApi.auth({secret: '<YOUR_SECRET>'})
let elResult = document.getElementById('result')
let elResultLink = document.getElementById('resultLink')
elResult.style.display = 'none'

in index.js it is showing an error as ConvertApi.auth is not defined. How to resolve this?

The error code is:

let convertApi = ConvertApi.auth({secret: 'secret key'})
                 ^

ReferenceError: ConvertApi is not defined
0

There are 0 best solutions below