Autenticación
La API de dTax usa cookies de sesión HttpOnly para la autenticación. Esto previene el robo de tokens mediante XSS.
Registro / Inicio de sesión
# 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.txtLa respuesta establece una cookie session HttpOnly válida por 7 días.
Usar la cookie
# All subsequent requests use -b cookies.txtcurl https://getdtax.com/api/v1/transactions \ -b cookies.txtOAuth
Google y GitHub OAuth también son compatibles:
GET https://getdtax.com/auth/googleGET https://getdtax.com/auth/githubAmbos redirigen a getdtax.com/auth/callback al completarse correctamente.