Dfns uses a two-token system for sensitive operations: anDocumentation Index
Fetch the complete documentation index at: https://docs.dfns.co/llms.txt
Use this file to discover all available pages before exploring further.
Authentication Token that authenticates your application, and a User Action Signature that proves end-user consent.
Token 1: The login token
TheAuthentication Token is like your API key, proving that requests are coming from a legitimate source. You must include this token in the Authorization header for every API call.
How to get it
Follow one of the authentication flows. The easiest way: create a service account and use it in your backend to call our API. This token answers the question: “Is my application allowed to talk to Dfns?”For a step-by-step guide on creating credentials and generating your first token, see the Dfns API using a service account tutorial.
Token 2: The User Action Signature
For sensitive operations like creating a key, initiating a transaction, or registering a wallet, you need a second token. TheUser Action Signature is a signed challenge that proves a user with a registered passkey has explicitly approved the action.
This token is sent in the X-DFNS-USERACTION header and is required for most POST, PUT, and DELETE requests.
Think of it like a bank transaction:
- The
Authentication Tokenis the bank teller’s ID, allowing them to access the banking system. - The
User Action Signatureis the customer’s signed withdrawal slip, authorizing a specific transaction.
To learn how to generate and use this signature, see the detailed User Action Signature Guide.
Next steps
Recommended guides
Credentials
Learn how to register users and their passkeys with Dfns.
Delegated wallets
Implement delegated wallets for your end users.
Sign requests
Generate User Action Signature.
Set up webhooks
Set up webhooks to receive real-time updates on your operations.
Essential References
API Reference
Explore every endpoint, parameter, and schema in the Dfns API.
SDKs
Get started quickly with our TypeScript, Go, and Java SDKs.
