各 Infusionsoft アカウントには、API を呼び出すための API キーがあります。
Infusionsoft アプリケーションの API キーを取得する手順は次のとおりです。
http://ug.infusionsoft.com/article/AA-00442/0/Infusionsoft-API-Key.html
キーを取得したら、PHP SKD を使用して電話をかけたり、連絡先を追加したりできます。infusionosft php SDK へのリンクは次のとおりです:
https://github.com/infusionsoft/infusionsoft-php
php の例とともに連絡先を追加するためのドキュメントへのリンクは次のとおりです:
https://developer.infusionsoft.com/docs/xml-rpc/#contact
https://github.com/infusionsoft/API-Sample-Code/blob/master/PHP/ContactService-Sample.php
編集
将来的には、oauth を使用する必要がなかったアカウントレベルのキーを廃止しているようです。
https://developer.infusionsoft.com/2014/07/03/simplifying-infusionsoft-authentication-with-oauth2/
Infusionsoft で oauth を使用する方法の例がたくさんあります:
https://developer.infusionsoft.com/docs/xml-rpc/#contact
右側の PHP をクリックすると、トークンを取得して API で連絡先を作成する方法が表示されます。
github の README にはさらに多くの例があります。
https://github.com/infusionsoft/infusionsoft-php/blob/master/README.md
認証:
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => 'XXXXXXXXXXXXXXXXXXXXXXXX',
'clientSecret' => 'XXXXXXXXXX',
'redirectUri' => 'http://example.com/',
));
// If the serialized token is available in the session storage, we tell the SDK
// to use that token for subsequent requests.
if (isset($_SESSION['token'])) {
$infusionsoft->setToken(unserialize($_SESSION['token']));
}
// If we are returning from Infusionsoft we need to exchange the code for an
// access token.
if (isset($_GET['code']) and !$infusionsoft->getToken()) {
$infusionsoft->requestAccessToken($_GET['code']);
}
if ($infusionsoft->getToken()) {
// Save the serialized token to the current session for subsequent requests
$_SESSION['token'] = serialize($infusionsoft->getToken());
// MAKE INFUSIONSOFT REQUEST
} else {
echo '<a href="' . $infusionsoft->getAuthorizationUrl() . '">Click here to authorize</a>';
}