구글 OAuth를 사용한다.
https://soda-dev.tistory.com/60
[API] 구글 OAuth로 토큰(access token) 발급받기
구글 클라우드 플랫폼을 사용하여 연동한다. OAuth토큰 사용 포스트맨 (Postman) 사용 구글 클라우드 플랫폼 https://console.cloud.google.com/ Google Cloud Platform 하나의 계정으로 모든 Google 서비스를 Go..
soda-dev.tistory.com
https://console.cloud.google.com/home/
Google Cloud Platform
하나의 계정으로 모든 Google 서비스를 Google Cloud Platform을 사용하려면 로그인하세요.
accounts.google.com
구글캘린더 사용
구글 클라우드 플랫폼에서 google calendar 검색
API문서 보기
##예시 : 캘린더 list를 불러오기
요청할곳이다. 기억해두자
Scope
요구하는 권한이다. 기억해두자
OAuth 사용범위 수정
다시 구글 클라우드 플랫폼으로 돌아가서 OAuth 동의 화면을 수정한다.
저장 후 계속
- 구글 캘린더 API문서에서 확인한 Scope를 입력한다
저장 후 계속 > 저장 후 계속
- 구글 캘린더 API문서에서 확인한 HTTP request를 사용해보기
- calendarid 대신 access_token으로 호출하기
https://www.googleapis.com/calendar/v3/users/me/calendarList?
access_token={엑세스토큰}
####에러
Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
에러는
엑세스토큰이 만료된 것
refresh token을 사용해서 access token을 다시 발급받자
https://soda-dev.tistory.com/61
[API] 구글 엑세스토큰(access token) 재발급 받기
Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/si..
soda-dev.tistory.com
'📁ETC. > 🪢 API Connection' 카테고리의 다른 글
[API] 구글캘린더API(2) - 이벤트 추가 (포스트맨 사용) (0) | 2022.04.09 |
---|---|
[API] 구글 엑세스토큰(access token) 재발급 받기 (1) | 2022.04.02 |
[API] 구글 OAuth로 토큰(access token) 발급받기 (2) | 2022.03.31 |
[API] Slack 슬랙 API 연동 -OAuth (0) | 2022.03.16 |