FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
stevekrouse

stevekrouse

protectiveCrimsonGalliform

Remix of stevekrouse/getMyValId
Public
Like
protectiveCrimsonGalliform
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
1
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
10/14/2024
README.md

getMyValId

Helper function for a val to get its own ID.

Usage

Create val
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

Get started with a template:
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.