Building your own app? Learn how to consume the Dfns APIs using a Service Account.
Once you have registered in your Dfns org and invited your Users, the next step is to create a Service Account, which you can think of as a machine user.
For more details on what service accounts are and when to use them, please refer to Service Accounts.
1
Prepare a key pair
Your service account will need its own key pair to sign its requests.
The easiest way to create a Public / Private Key pair is from the command line. You can use the commands shown below or see our documentation on key generation:
# Generate RSA Private Keyopensslgenrsa-outrsa2048.pem2048# Generate the Public Keyopensslpkey-inrsa2048.pem-pubout-outrsa2048.public.pem
2
Create the Service Account
Navigate to Settings > Developers > Service Accounts and click "New Service Account".
Name the Service Account, copy in the public key (including begin/end lines like -----BEGIN PUBLIC KEY-----), click “Create” and 🔑 sign the action with your passkey.
3
Store your Service Account authentication token
The last page shows the masked Service Account JWT. Copy it to a secure location before leaving the page.
The token will not be shown later!
4
Use the Service Account
You now have:
A Service Account Token: use it for authentication in all your API requests.