DIDWW API Sandbox#
The DIDWW API Sandbox is a testing environment for developing and validating integrations before using the production API.
Use the Sandbox to test API authentication, requests, application logic, error handling, and integration workflows without affecting production data or incurring real charges.
Sandbox environment#
Setting |
Value |
|---|---|
API base URL |
|
Token service |
|
Sandbox registration |
|
Sandbox sign-in |
|
API format |
JSON:API |
Authentication |
See Authentication |
Response media type |
|
Sandbox and production are separate environments. A sandbox account, API key, and access token cannot be used with the production API.
Warning
Do not use production credentials when testing sandbox requests. Sandbox and production credentials are not interchangeable.
Authentication#
Authentication requirements are version-specific. For API v2026-11-19, see Authentication for DIDWW API v2026-11-19. The corresponding OpenAPI document provides the machine-readable security definition.
DIDWW API v2026-11-19 Sandbox requests use a short-lived access token sent in
the Authorization: Bearer request header. You mint the token on the
Sandbox token service with a Sandbox API key. The instructions below explain
how to create the key, mint a token, and send a request with it. For earlier
versions, which send the API key in the Api-Key header, see the
Authentication page of that version, for example
Authentication for DIDWW API v2026-04-16.
Step 1: Create a sandbox account#
Open the DIDWW Sandbox registration page to create a Sandbox account. For detailed registration instructions, see the DIDWW account registration guide.
During registration:
Complete the registration form.
Confirm your email address.
Set your account password.
Sign in to the Sandbox User Panel.
Note
The email-confirmation link expires after seven days.
Important
Identity verification is unavailable in the Sandbox environment.
Step 2: Create a sandbox API key#
After signing in to the Sandbox User Panel:
Open APIs in the left navigation.
Select DIDWW API 3.
Select Create new API Key.
Enter a descriptive name, such as
Sandbox Integration.Optionally restrict the key to specific source IP addresses.
Select Create.
The new key appears in the API Keys table.
Warning
Keep the API key private. Do not include it in public repositories, documentation, screenshots, logs, or support messages.
If API-key management is unavailable, contact DIDWW Customer Support at support@didww.com.
Step 3: Mint an access token and send a test request#
Exchange the Sandbox API key for an access token on the Sandbox token
service. A read token is enough for a read-only test request:
1curl --request POST \
2 --url https://auth-sandbox.didww.com/token \
3 --header "Api-Key: YOUR_SANDBOX_API_KEY" \
4 --header "Content-Type: application/json" \
5 --data '{"aud": "api.didww.com", "scope": "read", "api_version": "2026-11-19"}'
Replace YOUR_SANDBOX_API_KEY with the key created in the Sandbox User
Panel. Sandbox services use the production host names as audiences, so
aud is api.didww.com in the Sandbox as well.
A successful request returns 200 OK with a JSON object. Copy the
access_token value. The token expires after expires_in seconds
(900 by default); mint a new one when it expires.
Set the API base URL to https://sandbox-api.didww.com/v3 and send a
safe, read-only request to the Countries endpoint:
1curl --request GET \
2 --url https://sandbox-api.didww.com/v3/countries \
3 --header "Authorization: Bearer YOUR_SANDBOX_ACCESS_TOKEN" \
4 --header "Accept: application/vnd.api+json"
Replace YOUR_SANDBOX_ACCESS_TOKEN with the access_token value.
A successful request returns an HTTP 200 OK response with the
application/vnd.api+json media type. The response body contains a
JSON:API collection of countries, and meta.api_version shows the version
that served the request.
Step 4 (optional): Set up callbacks#
If the integration receives callbacks, create and enable a callback secret in the Sandbox User Panel under APIs → DIDWW API 3 → Callback Secrets. DIDWW signs callbacks with the enabled callback secret and sends them only while one is enabled. See How to Set Up a Callback Secret.
Required headers#
Include these headers when calling the DIDWW API:
Authorization: Bearer YOUR_SANDBOX_ACCESS_TOKEN
Accept: application/vnd.api+json
For POST and PATCH requests containing a JSON body, also include:
Content-Type: application/vnd.api+json
Common errors#
401 Unauthorized
The access token is missing, expired, or was refused, or the token service refused the API key.
Confirm that:
API requests include the
Authorization: Bearerheader, not anApi-Keyheader.The token was minted on
auth-sandbox.didww.comwith a key created in the Sandbox User Panel.The request is sent to
sandbox-api.didww.com.The token has not expired. Mint a new one if it has.
The token’s
audincludesapi.didww.com.The API key is active.
Any configured IP restrictions allow the request’s source IP.
403 Forbidden with insufficient_scope
The token was minted with the read scope and the request uses a method
other than GET or HEAD. Mint a token with the full scope for
write requests.
406 Not Acceptable
The Accept header is missing or incorrect. Use:
Accept: application/vnd.api+json
415 Unsupported Media Type
A request containing a JSON body does not have the required media type. Use:
Content-Type: application/vnd.api+json
429 Too Many Requests
The request rate limit has been exceeded. In version 2026-11-19, the
requests an account sends with access tokens share one budget of 20 requests
per second, whichever API key minted the tokens. In versions up to 2026-04-16, each API
key is limited to 20 requests per second. Reduce the request rate and retry
after an appropriate delay. When a 429 response carries a
Retry-After header, wait the number of seconds it gives before
retrying. Reuse each access token until it expires instead of minting one
per request.
Add funds to a Sandbox account#
Add your billing address in Account Settings > Account Details. A billing address is required before you can add a payment method.
Then add a payment card to the Sandbox account using any suitable Stripe test card, and use the Add Funds flow in the Sandbox User Panel.
Important
Do not use real payment-card information in the Sandbox. Sandbox payment cards and balances have no monetary value and do not affect production.
Sandbox limitations#
The Sandbox simulates production API behavior, but it does not perform real service provisioning or billing.
Important limitations include:
Sandbox data is separate from production data.
Production accounts, API keys, and access tokens cannot be used in the Sandbox.
Sandbox accounts, API keys, and access tokens cannot be used in production.
Identity verification is unavailable in the Sandbox.
Telephone numbers and other Sandbox resources are test resources.
Some external provider or carrier behavior may not be reproduced completely.
Add Sandbox funds using Stripe test-card details, not real payment-card information.
Going to production#
Before switching an integration to production:
Create or sign in to a production DIDWW account.
Create a separate production API key.
Change the token service URL to
https://auth.didww.com/tokenand the API base URL tohttps://api.didww.com/v3.Replace the sandbox key with the production key, and mint production access tokens with it.
If the integration receives callbacks, create and enable a callback secret in the production account.
Review IP restrictions, callback URLs, rate limits, and error handling.
Test read-only production requests before performing write operations.
Never deploy a sandbox API key as a production secret.