0

I am trying to use the Podio API for the first time, and am trying to run the Hello World script on this page, but I keep getting this error: enter image description here

Here is my code:

<?php
require_once './vendor/podio/podio-php/PodioAPI.php';

$client_id = "<my_id>";
$client_secret = "<my_secret>";
$app_id = "<my_app_id>";
$app_token = "<my_app_token>";

Podio::setup($client_id, $client_secret);
Podio::authenticate_with_app($app_id, $app_token);
$items = PodioItem::filter($app_id);

print "My app has ".count($items)." items";
?>

When I comment out the last three lines and just run this:

<?php
require_once './vendor/podio/podio-php/PodioAPI.php';

$client_id = "<my_id>";
$client_secret = "<my_secret>";
$app_id = "<my_app_id>";
$app_token = "<my_app_token>";

Podio::setup($client_id, $client_secret);

?>

The code runs without errors, So that leads me to believe that it is a problem with the app token, but I got the app token by following these instructions

What is wrong here?

When I got my api key, I put in a fake url, because I am running this test my computer. Could that be the issue?

Community
  • 1
  • 1
Matt
  • 2,232
  • 8
  • 35
  • 64
  • duplicate: http://stackoverflow.com/questions/24611640/curl-60-ssl-certificate-unable-to-get-local-issuer-certificate – Pavlo - Podio Dec 11 '16 at 14:07
  • Possible duplicate of [PHP - SSL certificate error: unable to get local issuer certificate](http://stackoverflow.com/questions/28858351/php-ssl-certificate-error-unable-to-get-local-issuer-certificate) – Pavlo - Podio Dec 11 '16 at 14:09
  • @Pavlo-Podio I'm sorry, but there are so many different questions about this with so many different answers, and I don't really know which questions apply to me and which questions don't. Is the problem that my cacert.pem file is outdated, that's what one question said? My file says it's from 2012. – Matt Dec 11 '16 at 18:31
  • Have you tried some of those answers? Did any of them works? – Pavlo - Podio Dec 13 '16 at 01:01

1 Answers1

0

I solved this by downloading cacert.pem from this site https://curl.haxx.se/docs/caextract.html into my C:\xampp\php directory. I then uncommented/edited these lines in my php.ini file

curl.cainfo = "C:\xampp\php\cacert.pem" 
openssl.cafile="C:\xampp\php\cacert.pem"
Matt
  • 2,232
  • 8
  • 35
  • 64