Encountering a CORS error when attempting to use the Dunzo developer API. The base URL for the API can be found at
This is my code:
await axios
.get("https://apis-staging.dunzo.in/api/v1/token", {
headers: {
"client-id": "<MY_CLIENT_ID>",
"client-secret": "<MY_CLIENT_SECRET>",
"Accept-Language": "en_US",
"Content-Type": "application/json",
},
})
.then((response) => {
return res.status(200).json(response);
})
.catch((err) => {
console.log("err =====", err);
return res.status(400).json({
error: err,
});
});