1
Set your credentials
Put your keys in environment variables. Use
https://dev.idto.ai (staging) while you build and https://prod.idto.ai (production) when you go live. Keep the client ID and API key on your server only. Never ship them to a browser or a mobile app..env
2
Install
3
Add the token endpoint
POST /api/idto/token calls POST /auth/sdk/token with your client ID and API key and returns only the token and its lifetime to the browser.4
Open the verification flow
The page asks your server for a token and opens the flow. Use the workflow template ID from your dashboard, and drop In a full Django project, put
env: "development" in production.public/index.html
idto_token in a view module and add the route to your urls.py.5
Run and check
200
Good to know
- The SDK token lasts 900 seconds. Mint a new one for each verification instead of caching it.
- Minting a token is not charged. Verifications that run inside the flow are charged as usual.
- A
401from/auth/sdk/tokenmeans the client ID or API key is wrong, or the client is inactive. Your endpoint returns502in that case so the browser never sees the upstream detail. - To confirm the result from your server after
onWorkflowComplete, see Confirm a session result from your server.