Authentifizierung
Die dTax API verwendet HttpOnly-Session-Cookies zur Authentifizierung. Dies verhindert XSS-Token-Diebstahl.
Registrierung / Anmeldung
# 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.txtDie Antwort setzt ein session-HttpOnly-Cookie, das 7 Tage gültig ist.
Cookie verwenden
# All subsequent requests use -b cookies.txtcurl https://getdtax.com/api/v1/transactions \ -b cookies.txtOAuth
Google und GitHub OAuth werden ebenfalls unterstützt:
GET https://getdtax.com/auth/googleGET https://getdtax.com/auth/githubBeide leiten bei Erfolg zu getdtax.com/auth/callback weiter.