Developer information

The read API's require no authentication, and are based around simple HTTP GET requests which return JSON.

All requests require a hashed email address to identify the user.

Creating the hash


$email = trim( "UserName@example.com " ); // "UserName@example.com"
$email = strtolower( $email ); // "username@example.com"
echo md5( $email );
// "5f0efb20de5ecfedbe0bf5e7c12353fe"

                

Requesting a users timezone

$email = strtolower( trim( "user@example.com " ) );
$md5 = md5( $email );
$url = 'https://api.mytimezoneis.com/profile/'.$md5;

$jsonData = file_get_contents($url);
$json = json_decode($jsonData);

// {
//   "utc": {
//     "date": "2018-11-24 14:38:25.949945",
//     "timezone_type": 3,
//     "timezone": "UTC"
//   },
//   "local": {
//     "date": "2018-11-24 09:38:25.950010",
//     "timezone_type": 3,
//     "timezone": "America/New_York"
//   },
//   "timezone": "America/New_York",
//   "name": "Example User",
//   "updated": {
//     "date": "2018-11-24 08:49:01.000000",
//     "timezone_type": 3,
//     "timezone": "UTC"
//   }
// } 
                

If there is no user with that email address the API will respond with a 404 error.