| Name | Type | Description |
|---|---|---|
options | __type | Optional authentication configuration from DenoSandboxOptions |
// With explicit token
const token = getAuthToken({ token: "my-token" });
// Using environment variables (auto-detected)
const token = getAuthToken();
// From DenoSandboxOptions
const options: DenoSandboxOptions = {
auth: { token: "my-token" }
};
const token = getAuthToken(options.auth);Get the authentication token for Deno Sandbox API.
Authentication is resolved in the following priority order:
options.token is provided, it is used directly.If no token is found, an error is thrown with setup instructions.
# Go to https://app.deno.com -> Settings -> Organization Tokens
# Create a new token and set it as environment variable
export DENO_DEPLOY_TOKEN=your_token_here