Danke 🙂 funzt! 👌

const axios = require('axios'); (async () => { const topicData = await getTopicData(apiUrl); console.log(topicData); })(); async function getTopicData(apiUrl){ return axios.get(apiUrl, { headers: { 'Authorization': `Bearer ${baerertoken}` } }) .then((res) => { return res.data; }) .catch((error) => { console.error(error); }) }