oAuth2 - Custom error message when Access Token test fail with 403

  • 28 July 2021
  • 0 replies

Userlevel 1


I am building a custom integration using Zapier CLI and oAuth2 authentication scheme. The flow works just fine but I would like to extend a little bit my usage.

My question is the following:

During the “test” call used to assess the validity of the access token, it seems that any non 2XX response of the test endpoint result client-side in the error “This account is expired.Please reconnect it here.”

Is it possible to overwrite this error message for a given status code (ie. 403), for example with the message “Your are are not authorized to use this Connector”.

I tried using the afterRequest to throw a specific Error for this purpose but it seems that the result of the initial test does not take into account this middleware.

Thanks in advance,


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.