Full PHP Sandbox test
Use one PHP file to request a token and test every current read-only Voyced API endpoint available to your Sandbox key.
Only two values need changing
Open the file and replace
VOYCED_SANDBOX_API_KEY and VOYCED_SANDBOX_API_SECRET. The file is locked to Sandbox and automatically uses the first active telephone number for number-specific checks.Run it safely
Keep the completed file outside public_html. The script refuses browser access and must be run from the command line. Remove the credentials after testing, then delete the completed test copy.
Voyced Sandbox full PHP testOne PHP file inside a ZIP, with no third-party dependencies
Download ZIPRequirements
- PHP 7.4 or newer
- The PHP cURL extension
- Outbound HTTPS access to
https://sandbox.voycedconnect.eu - A Voyced Sandbox API key and API secret
- Command-line access. The test refuses to run through a web browser.
Run the test
1
Extract the ZIP
It contains voyced-sandbox-full-test.php.
2
Add your two Sandbox values
PHP configuration
const VOYCED_SANDBOX_API_KEY = 'PASTE_YOUR_SANDBOX_API_KEY_HERE';
const VOYCED_SANDBOX_API_SECRET = 'PASTE_YOUR_SANDBOX_API_SECRET_HERE';3
Run it from a terminal
Command
php voyced-sandbox-full-test.php4
Review each result
Each step shows PASS, FAIL or SKIP, plus the HTTP status, response time and Voyced request ID. The bearer token and API secret are never printed.
Requests included
| Order | Request | What it confirms |
|---|---|---|
| 1 | POST /v1/auth/token | The Sandbox API key and secret can issue a bearer token. |
| 2 | GET /v1/test | The key is linked to the expected Voyced customer access. |
| 3 | GET /v1/capabilities | The permissions and available functions for the key. |
| 4 | GET /v1/customer | The customer summary can be read. |
| 5 | GET /v1/numbers | Active telephone numbers can be listed. |
| 6 | GET /v1/balance | The call credit balance can be read when available. |
| 7 | GET /v1/numbers/{telephone_number} | The first returned active number can be read. |
| 8 | GET /v1/numbers/{telephone_number}/follow-me | Follow-Me can be read when the key has permission and settings are available. |
A failed optional endpoint does not hide the other results
The file continues after permission or availability errors so you can see the complete state of the Sandbox key. Authentication failure stops the test because no later request can run safely.
After the test
- Keep the request ID for any failed request.
- Remove the API key and secret from the file.
- Delete the completed test file from the server.
- Use protected environment variables or a secret manager in the real integration.