PHP : How do I get the token without a user / browser interface?

(Dave Lavinsky) #1

I’m trying to run this in command line.
<?php
$token = “”; # How do I populate this ?
$url = “https://api.infusionsoft.com/crm/rest/v1/hooks/event_keys?access_token=$token”;
$data = file_get_contents($url);
echo $data;
?>

(John Borelli) #2

Hi, @Dave_Lavinsky,

You’re going to need to get to know the three legged approach that IS uses with OAuth. I have a video on the subject I’ll paste below: