0

I have a vue-node application and want to authenticate the users with zapier authentication API. I tried using the below API but it takes account_id parameter which I don’t know how to get.

"account_id": 19907586,
https://zapier.com/api/v3/login

I could not find any official documentation of any API that can authenticate users with their zapier credentials, how can I do this ?

Where can I find an API to authenticate zapier users ?

1 Answers1

0

You can try this :

const axios = require('axios')
const { URLSearchParams } = require('url')

const { ZAPIER_API_KEY } = process.env

const zapierApi = axios.create({
    baseURL: 'https://api.zapier.com',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        Accept: 'application/json',
    },
})

const params = new URLSearchParams()

params.append('api_key', ZAPIER_API_KEY)

const authenticate = async () => {
    const response = await zapierApi.post('/v1/authenticate', params)
    return response.data
}

module.exports = {
    authenticate,
}
Silent observer
  • 79
  • 2
  • 13