Showcase / Campus authentication

Hey! A few libraries are available in PHP (from DoYouBuzz and AppVentus) and in Ruby.

If you use DoYouBuzz Showcase or DoYouBuzz Campus, you can access the datas of your application, users and CV with this this API.

How to access protected resources

GET | PUT | POST | DELETE http://showcase.doyoubuzz.com/api/v1/<method>?apikey=:apikey&timestamp=:timestamp&hash=:hash

Mandatory parameters

There are a few mandatory parameters for each request made to the Showcase API :

Parameter Description
apikey (mandatory) The API key of your application. You can get your apikey by login as an admin on your DoYouBuzz Showcase account, under "Settings", then "API".
timestamp (mandatory) The timestamp of your request
hash (mandatory) The hash is a security parameter you must compute and send for each request. An detailed explanation with code example is given below.

How to compute the hash parameter?

In plain english function
  1. Take all the parameters sent in the URL (both mandatory and optionals), order them by alphabetical order (according to their name), then concatenate their value.
  2. Add the apiSecret at the end of the resulting string
  3. MD5 the result: this is your hash
PHP Function

This function takes two parameters : an associative arrays of the parameters to send, and the apiSecret :

function computeHash($params, $apiSecret)
{
    $paramsStr = "";
    ksort($params);
    foreach ($params as $paramKey => $paramVal) {
        $paramsStr .= $paramVal;
    }
    $hash = md5($paramsStr . $apiSecret);
    return array_merge($params, array('hash' => $hash));
}
Example

Let's say you want to get the CV with the id 16546 (you have previously verified you can access this ressource). To do so, according to the documentation you need to send a GET to http://showcase.doyoubuzz.com/api/v1/dyb/cv/16546 with these parameters :

Parameter name Parameter value
timestamp 1359021513
apikey IuQSDLKQLSDK344590Li987
hash ???

So, let's compute the hash!

  1. First, order the parameters according to their name, then concatenate their value. You will have the following string : IuQSDLKQLSDK344590Li9871359021513.
  2. Then, append your apiSecret at the end of this string (here the apiSecret is IuJyt42BnUiOlPM8FvB67tG. You will have the resulting string : IuQSDLKQLSDK344590Li9871359021513IuJyt42BnUiOlPM8FvB67tG.
  3. Use this string to create a MD5, and you will have your hash parameter : 44f36e1dd04a10c0be21b2d8e880f22b

Now, you can send the request to the API :

GET http://showcase.doyoubuzz.com/api/v1/dyb/cv/16546?apikey=IuQSDLKQLSDK344590Li987&timestamp=1359021513&hash=44f36e1dd04a10c0be21b2d8e880f22b