Sandbox Testing
Test Token Sharing in the sandbox with AiPrise as the Donor.
Token Sharing needs two companies: a Donor who has already verified someone, and a Recipient who imports that record. These two endpoints set that up for you, with AiPrise as the Donor and your company as the Recipient, so you can test without a second account.
These endpoints work in the sandbox only. In production they return
404.
All you need is a sandbox API key. Both endpoints take an optional entity_types of USER_SESSION, USER_PROFILE and BUSINESS_PROFILE. Omit it to use all three. Both are limited to 10 requests per minute.
1. Set up your account
Set up sandbox Token Sharing does the setup you would normally do in the Dashboard with a real Donor.
It creates the connection between AiPrise and your company, already accepted, so you skip the handshake. It then creates one agreement per entity type, already approved, so you skip the section-by-section review. Each agreement covers a single record type, runs for a year, and is set to MANUAL import.
curl --request POST \
--url https://api-sandbox.aiprise.com/api/v1/token-sharing/bootstrap/sandbox-test-config \
--header 'X-API-KEY: <your sandbox API key>' \
--header 'Content-Type: application/json' \
--data '{ "callback_url": "https://your-app.example.com/webhooks/aiprise" }'callback_url is optional and is where your Token Sharing webhooks are sent. It must be reachable from the internet.
Each agreement in the response has a template_id and template_name. That template is a clone that now belongs to you — find it in your Dashboard and edit it like any other. import_mode is MANUAL, so nothing is imported until you ask.
Call this again any time. The same IDs come back, nothing is duplicated, and it is how you change your callback_url later.
2. Generate tokens
Generate sandbox test tokens creates approved demo records on the AiPrise Donor and shares each one with you. You get five tokens per entity type.
curl --request POST \
--url https://api-sandbox.aiprise.com/api/v1/token-sharing/bootstrap/generate-sandbox-test-tokens \
--header 'X-API-KEY: <your sandbox API key>' \
--header 'Content-Type: application/json' \
--data '{ "entity_types": ["USER_SESSION"] }'Each call creates new tokens. An entity type you have not set up yet is listed in skipped with the reason.
The records are fixed test data: five people and five companies, with invented names, addresses and identifiers.
3. Import a token
The demo records belong to the AiPrise Donor, so they do not appear in your Dashboard. The tokens are yours. Find them the same way you would in production:
- Wait for the
TOKEN_READY_TO_BE_IMPORTEDwebhook, if you set acallback_url. See Token Sharing Webhooks. - Or call List received tokens with
state=READY_TO_BE_IMPORTED.
Then import one with Import a token. The record appears in your account, created from the shared data and run through your cloned template. From here nothing is sandbox-specific — see Recipient Integration.
Updated about 20 hours ago
