Very first espresso from my new Breville Oracle espresso machine. I’m impressed with the capabilities and the quality of the espresso. ☕️
Ordered End of Trust, McSweeney’s Issue 54 done in collaboration with the EFF! 💜
Just signed up for a 4th site on Blot. This one will be to finally get a decent site for my Book Club.
Using API Credentials in Shortcuts
Shortcuts on iOS can do incredibly powerful things, and with a little bit of extra magic you can connect to most API’s as well. Pulling data from API’s, manipulating it, and extending your shortcuts is really powerful. However, you need to have a good way to manage the authentication tokens and secrets for those APIs.
Most Shortcuts I have seen use a Text variable and put the token in that variable. It’s then used throughout the Shortcut. This works, but it exposes problems if you share that Shortcut. It also has issues if you use the same API in multiple Shortcuts. You are now copying that token in numerous places.
Another approach that I prefer is to create Shortcuts that do nothing but return those tokens. You can then call those Shortcuts from another Shortcut to get the token. I prefix these Shortcuts with the prefix “Secret”.
Then when I need to use an token for an API I call the Shortcut and then reference the magic variable returned from it. You can even hide the execution of that second Shortcut.
In addition to reuse, you also get other benefits from this approach. Your Secret Shortcut can have some logic. For example, I access Working Copy from Shortcuts and it does so with a local URL call, protected with a random key. That key is specific to each iOS device. So, rather than try to synchronize the keys I have the Secret shortcut return whatever key is right for the device that is running.
I do a similar thing with MailChimp’s API token that requires some encoding be applied to it.
I find this a better way to manage these secret tokens, get reuse, and make it easier to change them. 👍
This post is part of the Shortcuts Collection.
Tammy and I had an amazing dinner at Popol Vuh last night. Guacamole, Jicama Salad, Costilla, and Carne Asada. Everything was delicious and so flavorful! The drinks were amazing as well!
Updating firmware FTW! This time the Joule Sous Vide.
Tammy’s sisters and my brother-in-laws escaped Breakout - Operation: Casino in 45 minutes! 🙌💪🔓 Room 25!
I’ve used an Airport Express (Gen 1) with an auto-switching amp to get AirPlay audio. The Airport Express is discontinued now. Sonos Amp does what I want, but is 3 times the cost. Recommendations on better solutions?
Quiet Friday night putting together tomorrows issue of the Weekly Thing. 👨💻
Closed on the sale of our old house. Now done with the moving stuff. Time to get settled into the new house. 🙌
Got a 2nd HomePod and am trying out a stereo pair. They sound incredibly good for the size.
Is there anything useful to do with 1,500+ CDs and 200+ DVDs? Going thru stuff after move and filtering. Is there an option better than garbage?
Gorgeous day for a smoking session on the Big Green Egg! First smoke at the new house! 🔥
I just preordered Cal Newport’s Digital Minimalism. I was going to buy it anyway so the additional benefits he added were a bonus! 📚
Took my new Ratio Eight Coffee Maker and Baratza Virtuoso grinder for a first run this morning, paired with Sump Coffee beans. It’s like an automatic Chemex, delicious brew! ☕️ Awesome surprise from my amazing and thoughtful wife. 🥰
I have no idea what I’m doing with this 3D Printer! But it’s still fun!
Today is moving day! 📦🚛🏠🥳
Internet service up and running at the new house! 🥳