如何在 Node JS 应用程序中使用 Zoho API?
How to use Zoho API in Node JS application?
我是Zoho服务的新手。我想在我的 Node JS 应用程序中使用 Zoho API。
该应用程序写在 Javascript 中。但是我在 Zoho REST API 文档 https://www.zoho.com/crm/help/api/v2/#create-bulk-read-op.
中找不到 Javascript 示例
给出的大多数示例都使用 curl 命令…
能否请您检查我的问题并告诉我如何在 Node Js 应用程序中使用 Zoho API?
使用superagent库(npm i superagent
):
var superagent = require('superagent')
superagent.
post('https://www.zohoapis.com/crm/bulk/v2/read').
set('Authorization', 'Zoho-oauthtoken d92d401c803988c5cb849d0b4215f52').
send({
query: {
module: 'Leads'
},
callback: { //optional
url: 'https://sampledomain.com/getzohoresponse',
method: 'post'
}
}).
end((err, res) => {
console.log(err, res.body)
})
我是Zoho服务的新手。我想在我的 Node JS 应用程序中使用 Zoho API。 该应用程序写在 Javascript 中。但是我在 Zoho REST API 文档 https://www.zoho.com/crm/help/api/v2/#create-bulk-read-op.
中找不到 Javascript 示例给出的大多数示例都使用 curl 命令…
能否请您检查我的问题并告诉我如何在 Node Js 应用程序中使用 Zoho API?
使用superagent库(npm i superagent
):
var superagent = require('superagent')
superagent.
post('https://www.zohoapis.com/crm/bulk/v2/read').
set('Authorization', 'Zoho-oauthtoken d92d401c803988c5cb849d0b4215f52').
send({
query: {
module: 'Leads'
},
callback: { //optional
url: 'https://sampledomain.com/getzohoresponse',
method: 'post'
}
}).
end((err, res) => {
console.log(err, res.body)
})