To switch environments, switch the key. Do not change the URL.
What changes in a test project
Atest project runs exactly the same code paths as a live project: same validation, same message lifecycle, same events, same errors. The differences are in:
- What it can connect. A test project only connects sandbox credentials from the provider.
- Billing. Messages from test projects are neither counted nor blocked by your plan allowance.
- Local webhooks.
http://endpoints onlocalhostare accepted only in test projects. In a live project, the URL must be HTTPS and cannot point to private or loopback addresses.
How to tell which environment you are in
The key prefix shows the environment. To confirm the project, callGET /v1/whoami:
Pointing to another host
To point the SDK at another instance, such as a local or staging installation, setbaseURL: