Have a Question?

If you have a question, start typing or search for it below.

All posts by Edward Smith

Sample Content API integration in PHP

<?php class Camayak_Request { // How many seconds the signed request can differ from // the current epoch seconds – the shorter the drift, // the less time the signed request has to be test. public $signed_url_drift = 5; // Your Camayak API key. private $api_key = ‘CAMAYAK_API_KEY’; // Your . . . Read more

The Camayak Content Publishing API

Beta documentation. All specifications subject to change Introduction The Content API allows Camayak customers the ability to unidirectionally publish approved assignments to delivery platforms not directly supported by Camayak. Some example use cases for the Content API: Publishing approved assignments as Facebook Posts Publishing approved assignments as Tumblr Posts Publishing . . . Read more

Validating the Webhook Camayak-Signature header – Sample PHP Code

<?php private function get_header_signature() { $key = ‘Camayak-Signature’; foreach (getallheaders() as $name => $value) { if($name == $key) { return $value; } } return NULL; } private function calculate_signature($epoch) { return hash_hmac(‘sha1’, $epoch . $this->api_key, $this->shared_secret); } public function verify() { // Verify that the incoming request is from Camayak. . . . Read more