SDKs version
v2.0.0 and above are using secure access by default when creating sandbox. This may not be compatible with older custom templates and you may need to rebuild them.Migration path
When using custom templates created before envdv0.2.0, you need to rebuild the templates to enable secure access.
Temporarily, you can disable secure access by setting secure to false during sandbox creation, but this is not recommended for production use because it increases security risks.
You can check the template envd version using the e2b template list command or by viewing the templates list on the dashboard.
Supported versions
All sandboxes based on templates with envd version at leastv0.2.0 already support secure access without any additional changes.
The secure access flag was introduced in 1.5.0 for JavaScript and Python SDKs to be used optionally.
Starting with SDK version v2.0.0, sandboxes are created with secure access enabled by default.
Access sandbox API directly
In some cases, you might want to access sandbox controller APIs directly through its URL, such as when you are not using SDKs. When secure access is enabled, you must provide an authentication token that was returned during sandbox creation. Each call to the sandbox controller must include an additional headerX-Access-Token with the access token value returned during sandbox creation.
For sandbox upload and download URLs, you need to generate pre-signed URLs. We are advising to use SDK for generating presigned URLs.