hume-auth
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.
This Val authenticates with the Hume API and returns an access token using the token authentication strategy.
Before using this Val, you need to set up the following environment variables:
HUME_API_KEY- Your Hume API keyHUME_SECRET_KEY- Your Hume Secret key
You can find these keys in the Hume Portal.
This Val is set up as an HTTP endpoint. When called, it will:
- Authenticate with Hume using your API key and Secret key
- Return the access token and related information
{ "access_token": "your_access_token", "token_type": "bearer", "expires_in": 1800 }
If there's an issue with authentication, the Val will return an appropriate error message with details about what went wrong.
- The access token expires after 30 minutes, so you'll need to request a new one periodically
- This Val is designed for server-side use to obtain tokens for client-side applications
- Never expose your API key or Secret key in client-side code