Python examples
Python examples
Four short scripts you can adapt.
These scripts call the REST API from Python. Each one is short, reads its secrets from environment variables and does one job.
| Example | What it does |
|---|---|
| Authorization with a dashboard token | Call the API with a permanent API token created in the dashboard. |
| Authorization via JWT | Sign in with an email and a password and call the API with the user token. |
| Script for parsing KYC sessions | Export sessions page by page with a date window. |
| Downloading session images | Save the images of one session to disk. |
Which token to use
A permanent API token is passed in the token field of the request body and suits server-to-server calls. A user token comes from user authorization and is passed in the token header. See authentication for the rules.
Samples use placeholders only. Replace them with your own values, and never publish a real token.