CATCH LOC Developers

Login

API KEY

Partner API KEY

The key is for the users to use CATCH LOC API
Available on www.catchloc.com

CERT KEY

The key is for API Server access control.
Sample function is used in real-time.

SERVER KEY

The key must be protected for both SPACOSA and Client Company’s security.
Available on www.catchloc.com

MEMBER KEY

Hash Key is given to membership of location collection target
On the CATCH LOC site, Hash Key of the smartphone location management menu is MEMBER KEY.

* With a signed-in account, each key can be checked on the CATCH LOC system.[Go to]

* When you request on a real server, CERT_KEY and timestamp will be transferred together.

* timestamp Range authentication : authenticate +/-10minutes.



CERT_KEY Generator Sample Code

Android / Java

/******************************************************************/ String api_key = "abcdefghijklmnopqrstuvwxyz1234567890"; // The key is confidential that should protect the security between two companies, SPACOSA and Client String server_key = "abcdefghijklmnopqrstuvwxyz1234567890"; long timestamp = new Date().getTime(); String cert_key = getAPICertKey(timestamp, api_key, server_key); public static String getAPICertKey(long timestamp, String api_key, String server_key) { String hash_in = timestamp+"|"+api_key+"|"+server_key; String result = ""; byte[] input = hash_in.getBytes(); try { MessageDigest messageDigest = MessageDigest.getInstance("SHA1"); messageDigest.update(input, 0, input.length); result = new BigInteger(1, messageDigest.digest()).toString(16); } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block e.printStackTrace(); } return result; } /******************************************************************/

PHP

/******************************************************************/ $api_key = "abcdefghijklmnopqrstuvwxyz1234567890"; // The key is confidential that should protect the security between two companies, SPACOSA and Client $server_key = "abcdefghijklmnopqrstuvwxyz1234567890"; $timestamp = time(); $cert_key = getAPICertKey($timestamp, $api_key, $server_key); function getAPICertKey($timestamp, $api_key, $server_key) { $hash_string = $timestamp."|".$api_key."|".$server_key; $hash_key = sha1($hash_string); $hash_key = substr("0000000".trim($hash_key), -40); return $hash_key; } /******************************************************************/