const axios = require('axios') const secret = "U2FsdGVkX1+TPSV7/E3PENx8ObiaQ9mIov/NO0Ry1mt5O8Awl1Ix+kX68wcBDbBTODj4Ejy3KkeW3n8ZqYhlqA=="; async function test() { const res = await axios({ method: "POST", data: { mobile: '9x91', "secret": secret }, url: "https://cdn-api.co-vin.in/api/v2/auth/generateMobileOTP", headers: { accept: "application/json", "Accept-Language": "en_US", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36", }, }); return res.data } (async () => { console.log(await test()) })()