US Congress Stock Trading API examples & templates
Use these vals as a playground to view and fork US Congress Stock Trading API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
![neverstew avatar](https://secure.gravatar.com/avatar/109fa713caf4e083c57622b7c6dad365.jpg?s=200&d=identicon)
neverstew
getSpotifyAccessToken
Script
getSpotifyAccess Token Request an access token for use with the Spotify Web API. Requires environment variables from your Spotify Developers account. SPOTIFY_CLIENT_ID SPOTIFY_CLIENT_SECRET Uses Blob storage to cache the spotify_accessToken based on when the expires_in value in the Spotify Access Token response. Example import { getSpotifyAccessToken } from "https://esm.town/v/dthyresson/getSpotifyAccessToken";
const accessToken = await getSpotifyAccessToken();
console.debug(accessToken)
0
![tr3ntg avatar](https://images.clerk.dev/oauth_github/img_2QyNgFrADFv8JHEaWwU4PAWF9zG.png)
tr3ntg
makeCallOnEmail
Email
Make Phone Call with Twilio Upon Email Receipt Backstory I bought a Bluetooth temperature monitor to monitor the temp in one of my rooms. I made sure to purchase one that sends alerts for temperatures that are out of a given range. Unfortunately, those notifications can’t be set to override Focus modes or when your phone is on Silent. But the app does allow you to add any email address for an alert. So, a Val Town Email handler + Twilio, and I’ve got myself an unmissable alert for if that room ever gets too hot or cold. 🔥🧊 How to Use Fork this Val, fill in your environment tokens (including phone number) and watch a call come through when you email the Val! Caveats This will call you on EVERY email. This works for my use case as the email is only registered with my temperature monitoring device. (You'll need to keep your emailing Val private, or add on some sort of verification to prevent errant emails and calls.)
0