getMyValId

Helper function for a val to get its own ID.

Usage

import { getMyValId } from "https://esm.town/v/stevekrouse/getMyValId" await getMyValId(import.meta.url)

Privacy & authentication

Works even if the val is private if you provide a Val Town API token for the account that owns the private val in question.

Below the Val Town SDK is implicitly authenticated, because it pulls user's Val Town API token from their default 'valtown' environment variable.

Migrated from folder: Archive/protectiveCrimsonGalliform