issue with invokeUrl getting 7213 while it's working on Postman!
Hi,
I have an issue when trying to invokeUrl for zoho api, here is the code :
- {
- dataFormat = "dd/MM/yyyy HH:mm:ss";
- Intime = '16/06/2021 15:06:50';
- emailId = "x@x.x";
- empid = 3;
- testparams = Map();
- testparams.put("Authorization","Zoho-oauthtoken 1000.xxxxxxxxxxxxxxxxxx");
- testparams.put("cache-control","no-cache");
- //body = "{'dateFormat':'dd/MM/yyyy HH:mm:ss','checkIn':'16/06/2021 15:06:45','empId':3}";
- body = "{\"dateFormat\":" + dataFormat + ",\"checkIn\":" + Intime + ",\"empId\":" + empid + "} ";
- resp = invokeUrl("https://people.zoho.com/people/api/attendance","POST",body,testparams,false);
- return resp;
- }
here is the Output:
{
"responseText": [
{
"msg": "Invalid input",
"response": "failure"
}
],
"responseHeader": {
"date": "Wed, 16 Jun 2021 12:36:38 GMT",
"server": "ZGS",
"content-length": 46,
"expires": "Thu, 01 Jan 1970 00:00:00 GMT",
"x-frame-options": "SAMEORIGIN",
"externalapicall": "allowed",
"pragma": "no-cache",
"strict-transport-security": "max-age=63072000",
"set-cookie": "_zpsid=2E25491BB23681078005E24AD967A5A5; Path=/; Secure; HttpOnly",
"api-count-left-today": 24989,
"x-content-type-options": "nosniff",
"x-xss-protection": 1,
"content-disposition": "attachment;filename=records",
"content-type": "application/json;charset=UTF-8",
"connection": "keep-alive",
"cache-control": "no-cache"
},
"responseCode": 200
}
when I tried the API with the same parameters using Postman I got successful response 200;
please advice
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.