안드로이드에서 카카오 API를 사용하기 위해서 먼저 애플리케이션의 키 해시를 등록해야 한다.
키 해시 가져오느라 아주 애먹어서 정리해보고자 한다.
👽 준비
Openssl 설치
OpenSSL for Windows
Download OpenSSL for Windows for free. OpenSSL Portable for Windows 32-bit and Android. OpenSSL is a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-p
sourceforge.net
다운로드한 후, 압축 해제한 경로를 기억해 준다.
환경 변수 설정

시스템 변수의 Path에 압축 해제한 openssl 폴더의 bin 경로를 추가해 준다.
🗝️ 키 추출
cmd를 이용하여 key를 추출해 보자.
Debug key hash 디버그 키 해시
keytool -exportcert -alias androiddebugkey -keystore ${key_path} -storepass android-keypass android | openssl sha1 -binary | openssl base64
- key_path : debug.keystore가 있는 경로 보통 C:\Users\${계정이름}\.android\debug.keystore
Release key hash 릴리즈 키 해시
keytool -exportcert -alias ${key_alias} -keystore ${keystore_path} | openssl sha1 -binary | openssl base64
- key_alias : key store 생성할 때 정한 key 이름
- keystore_path : key store 생성한 경로
🚨 Trouble Shooting
🚨 keytool 은(는) 내부 또는 외부 명령 실행할 수 있는 프로그램 또는 배치 파일이 아닙니다.라고 뜬다면?
https://jdk.java.net/
JDK Builds from Oracle
Production and Early-Access OpenJDK Builds, from Oracle Looking to learn more about Java? Visit dev.java for the latest Java developer news and resources. Looking for Oracle JDK builds and information about Oracle’s enterprise Java products and services?
jdk.java.net
💡릴리즈 키가 없다면 ? 릴리즈 키 생성 방법
안드로이드 스튜디오 Build ➡️ Generate Signed Bundle or APK... ➡️ APK 선택 후 Key store을 생성하면 된다.
'🌐 웹개발 > API' 카테고리의 다른 글
카카오 API | 카카오톡 공유하기 | 카톡 공유하기 | 카톡으로 URL 공유하기 (0) | 2024.02.06 |
---|---|
네이버 지도 API 사용법 | 지도 | 마커 (0) | 2024.01.26 |
안드로이드에서 카카오 API를 사용하기 위해서 먼저 애플리케이션의 키 해시를 등록해야 한다.
키 해시 가져오느라 아주 애먹어서 정리해보고자 한다.
👽 준비
Openssl 설치
OpenSSL for Windows
Download OpenSSL for Windows for free. OpenSSL Portable for Windows 32-bit and Android. OpenSSL is a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-p
sourceforge.net
다운로드한 후, 압축 해제한 경로를 기억해 준다.
환경 변수 설정

시스템 변수의 Path에 압축 해제한 openssl 폴더의 bin 경로를 추가해 준다.
🗝️ 키 추출
cmd를 이용하여 key를 추출해 보자.
Debug key hash 디버그 키 해시
keytool -exportcert -alias androiddebugkey -keystore ${key_path} -storepass android-keypass android | openssl sha1 -binary | openssl base64
- key_path : debug.keystore가 있는 경로 보통 C:\Users\${계정이름}\.android\debug.keystore
Release key hash 릴리즈 키 해시
keytool -exportcert -alias ${key_alias} -keystore ${keystore_path} | openssl sha1 -binary | openssl base64
- key_alias : key store 생성할 때 정한 key 이름
- keystore_path : key store 생성한 경로
🚨 Trouble Shooting
🚨 keytool 은(는) 내부 또는 외부 명령 실행할 수 있는 프로그램 또는 배치 파일이 아닙니다.라고 뜬다면?
https://jdk.java.net/
JDK Builds from Oracle
Production and Early-Access OpenJDK Builds, from Oracle Looking to learn more about Java? Visit dev.java for the latest Java developer news and resources. Looking for Oracle JDK builds and information about Oracle’s enterprise Java products and services?
jdk.java.net
💡릴리즈 키가 없다면 ? 릴리즈 키 생성 방법
안드로이드 스튜디오 Build ➡️ Generate Signed Bundle or APK... ➡️ APK 선택 후 Key store을 생성하면 된다.
'🌐 웹개발 > API' 카테고리의 다른 글
카카오 API | 카카오톡 공유하기 | 카톡 공유하기 | 카톡으로 URL 공유하기 (0) | 2024.02.06 |
---|---|
네이버 지도 API 사용법 | 지도 | 마커 (0) | 2024.01.26 |