Skip to main content

Hello,

 

I am trying to create my first zapier app, I choose the authentication to be token based. When ever the end point returns any valid json on testing url the validation passes.

How can I fail the validation if token is not valid? Do I return specific http status or there is some sort of json error I need to return, I could find any documentation

 

 

Your auth test endpoint should return a 401 or 403 HTTP status code if the token is bad or not included at all. Basically this represents a normal request to a protected resource so that Zapier can exercise their credentials and make sure that subsequent API requests are going to be allowed, so it should work like the rest of your API. 

If your API returns a 200 status for what is actually an error, you’ll have to handle each response and throw the appropriate error yourself. See https://zapier.github.io/zapier-platform/#zerrors. If you’re using the UI tool, switch to code mode to do this.