postUrl with authorisation

postUrl with authorisation

Hi

I am attempting to integrate Zoho CRM with Signable but need to know if the postUrl function has sufficient functionality to achieve this. Here is some PHP cURL code which performs a very simple task (retrieving all contacts) successfully. How would this be entered into the postUrl function? Specifically, how do I pass the api key and password? Here is my code.

<?php

 

// Initialize cURL

$ch = curl_init();

 

$url = 'https://api.signable.co.uk/v1/contacts?offset=0&limit=10';

 

// Set URL on which you want to post the Form and/or data

curl_setopt($ch, CURLOPT_URL, $url);

 

// Data+Files to be posted

//$post_data = array();

//curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);

 

curl_setopt($ch, CURLOPT_USERPWD, 'abc123enterapikey:x');

 

// Pass TRUE or 1 if you want to wait for and catch the response against the request made

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

 

// For Debug mode; shows up any error encountered during the operation

curl_setopt($ch, CURLOPT_VERBOSE, 1);

 

// Execute the request

$response = curl_exec($ch);

 

echo ($response);

    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