인증
dTax API는 인증에 HttpOnly 세션 쿠키를 사용합니다. 이를 통해 XSS 토큰 탈취를 방지합니다.
회원가입 / 로그인
curl -X POST https://getdtax.com/api/v1/auth/register -H "Content-Type: application/json" -d '{"email":"[email protected]","password":"yourpassword"}' -c cookies.txtcurl -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 쿠키가 설정됩니다.
쿠키 사용
curl https://getdtax.com/api/v1/transactions -b cookies.txtOAuth
Google 및 GitHub OAuth도 지원됩니다:
GET https://getdtax.com/auth/googleGET https://getdtax.com/auth/github성공 시 getdtax.com/auth/callback으로 리다이렉트됩니다.