Skip to main content

Im doing a GoToWebinar integration to get some data that´s not included in the native app and i need.
My auth is working for the first token but is not refreshing so i get promted to re-auth after 60 mins and my zaps get turned off, i noticed im getting a “403” error instead of a “401” so i guess i need to handle it manually??


Q: does anybody has some snippet/example to handle a 403 error as 401 in zapier´s platform UI ?

**The objective is to trigger the Refresh Token request  when i get a 403 error (instead of a 401)

Hi @carlosatconnex - Try handling it like so:

return z.request(options).then((response) => {
if (response.status === 403) {
throw new z.errors.RefreshAuthError();
}
response.throwForStatus();
return response.json;
});

 


Hi @carlosatconnex - Try handling it like so:

return z.request(options).then((response) => {
if (response.status === 403) {
throw new z.errors.RefreshAuthError();
}
response.throwForStatus();
return response.json;
});

 

Thank you very much @ikbelkirasan, this is spot on.


I added this snippet (excluding the “return response.json;”, since i´m already doing some parsing) to the desired Action API Endpoint (where i was getting the 403 error) and now the Refresh Token Request is actually invoked when i get the 403 error after the Access_Token expires and the Custom App connection is no longer lost.