Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

Working with SS API SSL Error

J.averbuch!
edited 12/09/19 in Archived 2017 Posts

I am trying to access my smart sheet from a php program via the API. Every time I run the program I get the following error, any idea why and how to fix it? (Bearer is my token)

Error:Unknown SSL protocol error in connection to api.smartsheet.com:443

<?php

$ch = curl_init();



curl_setopt($ch, CURLOPT_URL, "https://api.smartsheet.com/2.0/sheets/xxxxxxxxxxxxx");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, "TRUE");

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");

$headers = array();

$headers[] = "Authorization: Bearer xxxxxxxxxxxxxxx";

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);

if (curl_errno($ch)) {

    echo 'Error:' . curl_error($ch);

}

curl_close ($ch);

?>

 

Comments

This discussion has been closed.