본문 바로가기

Google API/Vision

Vision - 3. Athentication

1. Application default credentials

 

  • 서비스 계정키 위치 확인
$ pwd
/Applications/ssingssing2/ocr

$ ls -ll
total 8
-rw-r--r--@ 1 ssingssing2  staff  2317 10 26 18:40 ocr-java-test-97a423949d58.json

 

2. 계정키 등록

1) 환경변수로 설정

$ echo $GOOGLE_APPLICATION_CREDENTIALS
/Applications/ssingssing2/ocr/ocr-java-test-97a423949d58.json

 

2) 환경변수 실패 시

  • Environment Variables
    • Name : GOOGLE_APPLICATION_CREDENTIALS
    • Value : /Applications/ssingssing2/ocr/ocr-java-test-97a423949d58.json