I created a token using openzepplin + remix, I want to link it to web3, when checking the balance, everything is fine, when I make transferFrom, an error pops up, as if the balance is zero. What could be the problem? Error: Returned error: execution reverted: ERC20: transfer amount exceeds allowance
const Web3 = require('web3')
const Apk = require('./build/contracts/APKTEST.json')
let web3 = new Web3(new Web3.providers.HttpProvider('https://ropsten.infura.io/v3/id'))
var defaultAccount = web3.eth.defaultAccount;
web3.eth.defaultAccount = '0x6a6447CB492186a334ca2A51561D2D70659Ab0B1';
let contractAbi = new web3.eth.Contract(Apk.abi, '0xc45701C31357F0b5a9a22015E2b2601C9cA59A86');
contractAbi.methods.balanceOf('0x6a6447CB492186a334ca2A51561D2D70659Ab0B1').call(function (err, res) {
if (err) {
console.log("An error occured", err)
return
}
console.log("The balance is: ", res)
})
contractAbi.methods.transferFrom('0x6a6447CB492186a334ca2A51561D2D70659Ab0B1','0x5B38Da6a701c568545dCfcB03FcB875f56beddC4', 100).call(function (err, res) {
console.log(err)
})