CATCH LOC Developers

Login

API KEY

Partner API KEY

CatchLoc API를 이용하기 위해 별도로 고객사에게 발급되는 키
캐치락 사이트내에서 확인 가능합니다.

CERT KEY

민감한 정보일수 있기 때문에 API서버 접근제어용 인증키 입니다.
Sample function을 참조하여 실시간으로 생성하여 이용합니다.

SERVER KEY

스파코사, 고객사 양사간 보안을 유지하고 외부에 노출되면 안되는키입니다. 보안에 유의해 주세요.
캐치락 사이트내에서 확인 가능합니다.

MEMBER KEY

위치 수집대상 멤버쉽에 부여된 Hash Key
캐치락 사이트내 스마트폰 위치관리메뉴의 Hash Key항목이 MEMBER KEY입니다.

* 각 Key는 캐치락 시스템에 가입후 해당 계정으로 접속하여 조회하실수 있습니다.[바로가기]

* 실제 서버 request시에는 cert_key와 timestamp를 같이 전송합니다.

* timestamp Range인증을 +/-10분으로 인증을 합니다.



Android / Java

/******************************************************************/ String api_key = "abcdefghijklmnopqrstuvwxyz1234567890"; //스파코사, 고객사 양사간 보안을 유지하고 외부에 노출되면 안되는키 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"; //스파코사, 고객사 양사간 보안을 유지하고 외부에 노출되면 안되는키 $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; } /******************************************************************/