Skip to content

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, and any case where the phone is the camera and your script needs the photo.

bash
export SP_API_TOKEN="your-token"

# 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:1
python
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}`)
  }
}

There is no endpoint to configure and no webhook to register. The SDK photo handles verify the checksum and decrypt the photo before handing you the bytes. save() writes it straight to disk.

If your submissions are encrypted, pass your personal password to decrypt them: passwords=["..."] in Python, passwords: ['...'] in TypeScript, -p "..." on the CLI.