R1D4 Buffer API
For Day 4 I started working with the Buffer API for OldPosts since ultimately I want the script to run once a day and add posts to my buffer.
The docs are great, and getting started with the API was straightforward. Luckily, they provide you with an access token so that you do not have to do an Oauth dance if you are making a “single user application”.
I used Postman to explore the Buffer API since its dead simple to make requests, and inspect results.
I used two API calls to make this happen. First I get a list of all profile ID’s that are connected to my buffer and use a “fancy” list comprehension to extract just the ID values.
def get_buffer_profiles():
"""
Return list of all connected profile ID's in Buffer Account
"""
profiles = requests.get("https://api.bufferapp.com/1/profiles.json?access_token={0}".format(os.environ['BUFFER_TOKEN']))
return [s['id'] for s in profiles.json()]
def create_buffer_update(update):
payload = {
'profile_ids[]': get_buffer_profiles(),
'text': update,
'top': 'True'
}
response = requests.post("<a class="vglnk" href="https://api.bufferapp.com/1/updates/create.json?access_token={0}%22.format(os.environ[%27BUFFER_TOKEN%27])" rel="nofollow">https://api.bufferapp.com/1/updates/create.json?access_token={0}".format(os.environ['BUFFER_TOKEN'])</a>, data=payload)
return response.json()

Last step is to set up a CloudWatch event to kick off this Lambda job once a day. :)
Thank you for reading! Share your thoughts with me on bluesky, mastodon, or via email.
Check out some more stuff to read down below.
Most popular posts this month
- 2024
- Reinstalling Windows at 1am
- SQLite DB Migrations with PRAGMA user_version
- My Custom Miniflux CSS Theme
- How to Disable Wayland in Debian Testing
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- Sit On Your Ass Web Development from Jim Nielsen’s Blog
- Underused Techniques for Effective Emails from Refactoring English
- Death by a thousand slops from daniel.haxx.se
- The AGI economy is coming faster than you think from Freethink
- Rolling the ladder up behind us from Xe Iaso's blog
- In Praise of “Normal” Engineers from charity.wtf
- Reports of Bluesky's death have been greatly exaggerated from The Torment Nexus
- What Would a Kubernetes 2.0 Look Like from matduggan.com
Articles from blogs I follow around the net
People fall in love with all kinds of things including AI chatbots
OpenAI recently released a new version of its ChatGPT artificial-intelligence engine, called GPT-5. Normally, I wouldn't choose to write about the latest iteration of a product that is in its fifth generation, especially since GPT-5 doesn't seem r…
via The Torment Nexus August 14, 2025Theatre Review: Being Mr Wickham ★★★★★
Mr Wickham is ready to set the record straight. Celebrating the 250th anniversary of Jane Austen’s birth, Adrian Lukis, who starred in the renowned BBC TV adaptation of Pride and Prejudice, returns to the role of Mr Wickham. Join Pride and Prejudice’s mo…
via Terence Eden’s Blog August 14, 2025The Library
Rose’s favorite daddy-daughter dates are at the libraries. We try to go once or twice a week. To play. To build in the sensory room. To look at all the Amiibos near the front entrance. To use the elevator. To walk around. To observe. To think. To have a…
via nashp.com August 14, 2025Generated by openring