Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29758

How to retrieve Zoho mails using Zoho mail api's in Node.js?

$
0
0

I want to retrieve Zoho mails in Node js.I have got Zoho Access Token.Using the Access Token and the api http://mail.zoho.com/api/accounts I have retrieved the Zoho Account Id. After that using Account Id and the api https://mail.zoho.com/api/accounts/accountId/folders I have retrieved all the folderId.The Zoho api documentation says using the api http://mail.zoho.com/api/accounts/accountId/messages/view I can retrieve the mails of a folder by passing the folderId in body. But when I do so, it gives error "Invalid_token". So, how can I reyrieve the mails from zoho?

Here is the snippet of teh last Api code-

 const option = {             url: ' http://mail.zoho.com/api/accounts/'+ accountId +'/messages/view',             body: { "folderId": folderId }               }; Request(option, (err, response) => {               if (err) console.log(err)               else {                   console.log(JSON.parse(response.body))                  }

Viewing all articles
Browse latest Browse all 29758

Trending Articles