[PHP] Can't POST to People Endpoint with Curl
Hi All,
I'm trying to create a timesheet via an API call.
Even though I am not passing an AuthToken and parameters, the error should say 'Provided authentication token is invalid', but the error I get is:
{"response":{"message":"Error occurred","uri":"/api/timetracker/createtimesheet","errors":{"code":7206,"message":"This URL can be invoked via POST method only"},"status":1}}
- $url = "http://people.zoho.com/people/api/timetracker/createtimesheet";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, array());
- $result = curl_exec($ch);
- curl_close($ch);
- echo $result;
- return $result;
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
-
-
-
-
-
-
-
-
-
Sticky Posts
Meet the Zoho People experts in your city!
Dear users, We are delighted to invite you to the Zoho People's user community meetup. We are stoked to visit our users in their cities and help them with all things Zoho People. Join us for a day of insightful Zoho sessions, interactions with other
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.