컨텐츠로 건너뛰기

인증

dTax API는 인증에 HttpOnly 세션 쿠키를 사용합니다. 이를 통해 XSS 토큰 탈취를 방지합니다.

회원가입 / 로그인

Terminal window
curl -X POST https://getdtax.com/api/v1/auth/register -H "Content-Type: application/json" -d '{"email":"[email protected]","password":"yourpassword"}' -c cookies.txt
curl -X POST https://getdtax.com/api/v1/auth/login -H "Content-Type: application/json" -d '{"email":"[email protected]","password":"yourpassword"}' -c cookies.txt

응답으로 7일간 유효한 session HttpOnly 쿠키가 설정됩니다.

쿠키 사용

Terminal window
curl https://getdtax.com/api/v1/transactions -b cookies.txt

OAuth

Google 및 GitHub OAuth도 지원됩니다:

GET https://getdtax.com/auth/google
GET https://getdtax.com/auth/github

성공 시 getdtax.com/auth/callback으로 리다이렉트됩니다.