const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: '<string>',
groupIds: ['class-101', 'class-102'],
sessionId: '<string>',
theme: {
primaryColor: '<string>',
secondaryColor: '<string>',
backgroundColor: '<string>',
textColor: '<string>',
fontFamily: '<string>',
fontSize: '<string>',
borderRadius: '<string>',
padding: '<string>',
logoUrl: '<string>',
hideBranding: true
},
width: '<string>',
height: '<string>',
expiryHours: 1
})
};
fetch('https://studyfetchapi.com/api/v1/components/{id}/embed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));