Error 400 while integrating Go-Swagger based API with Zapier

  • 19 February 2021
  • 1 reply

  • Anonymous
  • 0 replies

I have created & deployed a REST API server using Go, gin-gonic, swagger documentation.

I have also created some endpoints for sending GET & POST requests to that server.

For authentication, I have set a custom authentication header key "Authorization" with its value input from the user as an API key (Through this API key, my REST API server sends further request to a third-party cloud storage service)

I am able to authenticate & send GET/POST requests successfully from browser (Swagger API documentation webpage), Postman client and it works absolutely fine.

Now I was trying to integrate that server's API to Zapier.

But when I test my authentication by entering the API key, it displays following error with some node.js event issues:

We hit an error adding your new account
authentication failed: The app returned "400". What happened (You are seeing this because you are an admin):
Stack trace:
"url":"http://<my API endpoint URL>/transfer/foldername/filename.jpg"
at Object.throwForStatus (/var/task/node_modules/zapier-platform-core/src/http-middlewares/after/throw-for-status.js:7:11)

From previous event:
at executeHttpRequest (/var/task/node_modules/zapier-platform-core/src/execute.js:22:6)
at execute (/var/task/node_modules/zapier-platform-core/src/execute.js:90:12)
at input (/var/task/node_modules/zapier-platform-core/src/create-command-handler.js:29:14)
at Object.beforeMiddleware.then.newInput (/var/task/node_modules/zapier-platform-core/src/middleware.js:90:22)
at bound (domain.js:402:14)
at Object.runBound (domain.js:415:12)

From previous event:
at input (/var/task/node_modules/zapier-platform-core/src/middleware.js:89:45)
at loadApp.then.appRaw (/var/task/node_modules/zapier-platform-core/src/tools/create-lambda-handler.js:215:18)
at bound (domain.js:402:14) at runBound (domain.js:415:12)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)

From previous event:
at (/var/task/node_modules/zapier-platform-core/src/tools/create-lambda-handler.js:200:10)
at (domain.js:349:14)
at Runtime.handler (/var/task/node_modules/zapier-platform-core/src/tools/create-lambda-handler.js:192:19)
at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)

Am I missing something here?

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

1 reply

Userlevel 7
Badge +12

Hi @testsid123!


Could I ask if you’re using the Webhooks by Zapier app to put together the integration or are you using the Zapier Platform to develop a custom integration? Thanks! 🙂