I have successfully tested authentication with Postmand using Basic Auth and was able to get the token as expected. But when I try the same using Zoom Script Widget, I consistently receive a 400 error from Athena indicating “Client ID required”. I appears that the script widget may not be sending he Authorization header correctly or getting stripped out or something. Even moving client_id and Client_secret into the body was also getting rejected by Athena API. Could you please confirm whether:
Custom ‘Authorization’ headers are supported in Script Widgets?
There’s an alternative way to implement Basic Auth from within the Script Widget environment?
Or what’s the best way to proceed with this scenario?
Hi Justin,
Thanks for that. I have made some progress. It’s not throwing any error but the response is coming empty too. Do you see if I am doing anything wrong here? How to get the response value?
try{
const data={
“grant_type”: “client_credentials”,
“scope”: “athena/service/Athenanet.MDP.*”
}
const response= await req.post(url, data, {
headers: {
“Authorization”: authHeader,
“Content-Type”: “application/x-www-form-urlencoded”
}
})
log.debug(“Response :”, response.toString());
}
catch(err){
log.debug(err.message);
}
Update: I have also tested the same with HTTP Call widget, get a 200 back but nothing in the response. Any idea why?