const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({connection: {operations: ['genericCompany::create']}, expiresIn: 123})
};
fetch('https://api.runmorph.dev/v1/connections/{connectorId}/{ownerId}/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));