Upload file to workdrive using php-curl

Upload file to workdrive using php-curl


I am trying to upload a file to workdrive using php-curl and i recieve this error
(a)On firefox {"errors":[{"id":"F000","title":"INVALID_TICKET"}]}
(b)on chrome "HTTP ERROR 500.  workdrive.zoho.com is currently unable to handle this request."

(Request and Response are attached as atachements)

here is my,

html--
<form method="POST" enctype="multipart/form-data" action=" https://workdrive.zoho.com/api/v1/upload" >
       
        <input type=hidden name=filename value="docment" />
         <input type=file name=content value="" />
         <input type=submit name=submit value="UPLOAD" />
  </form>
 
  php--
 
   $headers = array(
        sprintf('Authorization: Zoho-oauthtoken %s', $oauth)
    );


    $ch = curl_init();
    curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
    curl_setopt($ch,CURLOPT_TIMEOUT,60);
    curl_setopt($ch,CURLOPT_POST,true);
    curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);



    curl_setopt($ch, CURLOPT_CUSTOMREQUEST,"POST");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  
  
  
    // Check for errors and display the error message  
    if($errno = curl_errno($ch)) {

        echo "inside error block";
        $error_message = curl_strerror($errno);
        echo "cURL error ({$errno}):\n {$error_message}";
    }


    $response = curl_exec($ch);

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    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

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now