Authentication
The dTax API uses HttpOnly session cookies for authentication. This prevents XSS token theft.
Sign up / Login
# Create accountcurl -X POST https://getdtax.com/api/v1/auth/register \ -H "Content-Type: application/json" \ -c cookies.txt
# Logincurl -X POST https://getdtax.com/api/v1/auth/login \ -H "Content-Type: application/json" \ -c cookies.txtThe response sets a session HttpOnly cookie valid for 7 days.
Using the cookie
# All subsequent requests use -b cookies.txtcurl https://getdtax.com/api/v1/transactions \ -b cookies.txtOAuth
Google and GitHub OAuth are also supported:
GET https://getdtax.com/auth/googleGET https://getdtax.com/auth/githubBoth redirect to getdtax.com/auth/callback on success.