Skip to content

Instantly share code, notes, and snippets.

@danhstevens
danhstevens / _auth.php
Last active December 2, 2016 21:15
Kickbox Recipient Authentication Example PHP Scripts (Not for production use!)
<?php
$appCode = "YOUR_APP_CODE";
$apiKey = "YOUR_API_KEY";
$post = array('fingerprint' => $_POST['fingerprint'], 'apikey' => $apiKey);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api.kickbox.io/v2/authenticate/" . $appCode);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
@danhstevens
danhstevens / gist:274b020e8213bb95b3bd
Created December 4, 2014 03:18
Kickbox - Catching an error with PHP
<?php
require_once 'vendor/autoload.php';
$client = new KickboxClient($api_key);
$kickbox = $client->kickbox();
try {
  $resp = $kickbox->verify($email);
  print_r($resp->body);
 }