Authentication

Applications built on the Fotoglif API have the ability to take part in the revenue sharing system. In order to participate, partner applications can sign each request they make. These signed requests return a publisher ID in the returned embed code for the images which allows the Fotoglif system to track revenue sharing.

To get started, use the form at the top of this page to request a key. You will receive an email with your public key and secret key. Once you’ve received your keys, follow the instructions below to sign your requests.

Signing a Request

A signed request contains a couple of extra parameters in every API request. The parameters are sig, key, and now. sig is a specially crafted unique MD5 hash signature in hex-digest format. key is your public key; a value that identifies you in the system. now is a unix time stamp (make sure to cast the value as an integer as some systems will allow floats for higher degrees of accuracy). All three parameters are required in order for a request to be signed and logged in the revenue sharing system.

Generating a Signature

In order to generate the sig value in your requests, follow these steps:

  • Create a string by concatenating the following values in order:
    • your secret key
    • the unix time stamp (cast as an integer)
    • your public key
  • Create a hex-digest of an MD5 hash of the concatenated string

The MD5 hash is the value you will use in sig and must be generated for each request.

Be sure not to share you secret key with anyone.