Apps, the API and integrations
The phone apps, the command line, the browser extension, n8n and Zapier, and the public API they all use -- with webhooks and trigger URLs.
In this chapter
- The phone apps
- Seeing and removing connected apps
- The command line
- The browser extension
- n8n and Zapier
- Webhooks
- Trigger URLs
- The public API
The phone apps
ShiftMyData for Android and for iPhone and iPad show your clouds, folders, transfers and schedules. Sign in with Sign in: it opens shiftmydata.com, where you allow the app. The app never sees your password.
- Upload from the phone, download, share a link, rename, delete, copy and move between clouds.
- Camera backup, under Account, copies new photos and videos into a folder per month of the cloud folder you choose, on Wi-Fi only unless you switch that off. Nothing is deleted from the phone.
- Your clouds appear in the phone's Files app, and Share from any app sends files to ShiftMyData.
- Lock with Face ID (or fingerprint, or the phone's PIN) asks again when you come back after half a minute.
- The sign-in is tied to a key inside the phone's secure hardware: a copy of it is useless on another device.
Seeing and removing connected apps
Developers, under Account, lists every app that can use your account -- the phone apps, the command line, the extension, n8n, Zapier and apps other people made -- with what each may do and when it was last used. Disconnect ends an app's access on every device at once.
- You get an email the first time an app is given access, and when an app's sign-in is ended because a copy of its token turned up somewhere it should not.
- An app can be limited to some folders when you allow it. It then sees nothing else.
- API tokens are for your own scripts: a token works until you revoke it. Treat it like a password.
The command line
Install it with pipx install shiftmydata, then run shiftmydata login: it shows a short code and opens shiftmydata.com, where you check the code and allow it.
- shiftmydata ls "My Drive:Projects"
- Lists a folder. A place is the cloud's name, a colon, then the folder.
- shiftmydata cp SOURCE DESTINATION
- Between two clouds it starts a transfer; from a file on this computer it uploads; to a folder on this computer it downloads.
- shiftmydata sync SOURCE DESTINATION
- Makes the destination match the source, deletions included. --max-delete stops it before it deletes more than you expect.
- shiftmydata save URL PLACE
- Saves something on the web into a folder: --as file, video, page (a PDF) or image.
- shiftmydata jobs, job ID --watch, cancel ID
- Follow and steer transfers.
- shiftmydata schedules, run NAME, trigger NAME
- List and run schedules, and make a trigger URL.
Every command takes --json for scripts. shiftmydata logout ends the sign-in and forgets this computer's key.
The browser extension
The extension for Chrome, Edge and Firefox saves straight into your clouds. Open it, sign in, and choose the cloud and folder things go into.
- Right-click a link, an image or a video and choose Save ... to ShiftMyData, or press Save this page as a PDF in the extension.
- ShiftMyData fetches the file, not your browser, so a large file never passes through your computer.
- Recent shows the last saves and whether they arrived.
n8n and Zapier
- n8n: install the community node n8n-nodes-shiftmydata, then sign in with an API token or your own app. Actions start transfers, save links, list folders and run schedules; ShiftMyData Trigger starts a workflow when a transfer finishes or fails.
- Zapier: connect ShiftMyData, then use New Event as a trigger, and Start Transfer, Save From Web or Run Schedule as actions.
- Both send each action once, even when they retry.
Webhooks
A webhook sends an event -- a transfer finished or failed, a schedule was switched off, a live mirror copied changes -- to an address of yours, as soon as it happens. Add one under Notifications as Webhook, or through the API.
- Each delivery is signed with the webhook's secret (the Standard Webhooks headers webhook-id, webhook-timestamp and webhook-signature). Check the signature, and refuse a delivery older than five minutes.
- Rotate secret makes a new one; the old one keeps signing for a day so you can switch without missing anything.
- Deliveries shows the last attempts with the answer your address gave, and Replay sends one again.
- A delivery that fails is retried for about three days. A webhook that has failed for five days is switched off, and you get an email.
Trigger URLs
A trigger URL runs a schedule when something calls it -- a build that finished, a form that was sent. Make one on the schedule with Trigger URL. Anyone with the address can run the schedule, so choose Signed to require the caller to sign each request with the secret shown once.
- A trigger never runs a schedule more often than the shortest time between runs (15 minutes).
- Remove ends the address at once; make a new one to replace it.
The public API
Everything above uses the same public API, documented at shiftmydata.com/developers. To build your own app, register it under Developers: a server app gets a client secret or signs with its own key; an app on a device signs in with PKCE and has its tokens tied to a key on the device.
- For JavaScript and TypeScript, npm install shiftmydata gives a ready-made client for scripts and servers: it signs in with an API token, starts and follows transfers, uploads and downloads files, and checks webhook signatures.
- An app asks only for what it needs (to read files, to start transfers...), and you see exactly that on the page where you allow it.
- Send an Idempotency-Key with each write so a retry never does the work twice.
- Each app has its own rate limit; the answer's RateLimit headers say how much is left.
Try it
Everything here is in ShiftMyData's Help too, once you are signed in. Start free
← Notifications · Plans, allowance and codes → · Every chapter