One environment#
Subcontext has one environment, with no separate sandbox address.
| What | Address |
|---|---|
| The API | https://subcontext.com/api/v1 |
| Access tokens | https://subcontext.com/oauth/token |
| The embeds' scripts | https://js.subcontext.com |
| The OpenAPI document | https://subcontext.com/developers/api/openapi.yaml |
Testing safely#
Tests do real things. A test lead appears in your CRM, and a test chat can send a real text message.
- Use your own details (your own name, email address and phone number) when you try an embed or send a test lead.
- Try embeds on a test page of your own website, such as a staging site, after adding that site's address to the embed's approved websites. Embeds don't run from a file opened on your computer.
- Keep secrets out of test code you might share. The examples read them from environment variables.
If your website has a content security policy#
A content security policy lists the places a website may load things from. If yours has one, allow Subcontext:
script-src https://js.subcontext.comconnect-src https://subcontext.com wss://subcontext.com
Some embeds need more. Each embed's guide lists what.
Getting help#
Email hello@subcontext.com. Include the embed or API request you're working on, the page address, and any message from the browser console or the API's response. Don't include your client secret.