Send a photo from the field to your script
Tap Photo in the Simplepush app, snap a picture, and a script listening on your account picks it up in real time.
Good for: field logging, quick screenshots to your dev group, expense receipts straight into your accounting script, anything where your phone is the easiest camera and your script is the easiest place for the photo to land.
bash
# every submission arrives as one JSON line; --save-files downloads
# each photo into ./inbox as it lands, decrypted and checksum-verified
sp collect --submissions --save-files ./inbox
# or stop after the first photo
sp collect --submissions --save-files ./inbox --until count:1python
import asyncio
from simplepush import Client
client = Client(api_token="YOUR_API_TOKEN")
async def main():
async for s in client.submissions():
if s.photo:
path = await s.photo.save("./inbox")
print(f"Saved {path}")
asyncio.run(main())ts
import { Client } from '@simplepush/sdk'
const client = new Client({ apiToken: 'YOUR_API_TOKEN' })
for await (const s of client.submissions()) {
if (s.photo) {
const path = await s.photo.save('./inbox')
console.log(`Saved ${path}`)
}
}No endpoint to configure, no webhook to register. The SDK photo handles verify the checksum and decrypt before handing you the bytes; save() writes straight to disk.
If your submissions are encrypted, pass your personal password (passwords=["..."] in Python, passwords: ['...'] in TypeScript, -p "..." on the CLI) to decrypt them.