let https = require('https');
let agent = new https.Agent({
pfx: certificado,
passphrase: ''
})
var axios = require('axios');
var data = JSON.stringify({ grant_type: 'client_credentials'});
var config = {
method: 'post',
url: 'https://api-pix-h.gerencianet.com.br/oauth/token',
headers: {
'Authorization': Basic ${base64},
'Content-Type': 'application/json',
},
httpsAgent: agent,
data: data
};
try {
const response = await axios.request(config);
return response.data
} catch (error) {
console.error(error);
}