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
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.