I try to attach a document on the field in Zoho, But I fail and response me error 400, which is wrong format
Here is the code
- var reader = fs.createReadStream('1.txt');
- var form_data = new FormData();
- form_data.append("file", reader);
- var joson_form_data = JSON.stringify(form_data);
- var response = await axios({
url: `https://www.zohoapis.com/crm/v2/${module}/${recordID}/Attachments`,
method: "POST",
headers: {
Authorization : `Zoho-oauthtoken ${accToken}`,
"Content-Type": "multipart/form-data"
},
data: joson_form_data })
the error message is "unable to process your request. please verify whether you have entered proper method name, parameter and parameter values"