Appearance
js
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.doppio.sh/v1/render/screenshot/async',
headers: {
'Authorization': 'Bearer <YOUR API KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
doppio: {
webhook: {
url: 'https://my-url.com/callback',
method: 'POST'
}
},
page: {
screenshot: {
fullPage: true,
type: 'webp'
},
goto: {
url: 'https://www.spacejam.com/1996'
}
}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});