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);