Where are my social media tokens stored? Cloud vs local-first
Your social media tokens are stored wherever your scheduler runs. When you connect an account, the platform issues the app an access token, often with a refresh token, and the app keeps both. A cloud scheduler stores the
Your social media tokens are stored wherever your scheduler runs. When you connect an account, the platform issues the app an access token, often with a refresh token, and the app keeps both. A cloud scheduler stores them on its own servers, usually encrypted, because those servers have to publish while your laptop is closed. A local-first tool stores them in a file on your own machine. In both cases the token works as a bearer credential. Whoever holds it can act as you, within the scopes you granted, until it expires or you revoke the app in the platform's settings.
Where does a cloud scheduler keep your tokens?
A cloud scheduler keeps your tokens in its own database or secrets store, and it has to. The whole point of a hosted tool is that its servers fire your 9 a.m. post while you are asleep, and they can only do that with a usable credential on hand.
Most services encrypt tokens at rest. Good, but know the limit. The service must be able to decrypt a token at publish time, so encryption protects against a stolen disk or a leaked database dump without the key. It does not protect against a compromise of the running service itself.
The other property is concentration. One store holds the tokens of every customer, which makes it a valuable target. It also usually means a security team whose full time job is defending it. I'd rather state that trade plainly than pretend one side has no cost.
Where does a local-first scheduler keep your tokens?
A local-first scheduler keeps your tokens on your own computer, typically in a config or .env file that only your user account can read. No shared server holds them, so a breach of the maker's servers exposes no stored tokens of yours.
The trade moves to your machine. Anything that can read your files as your user (malware, a synced folder you forgot about, a careless backup) can read the tokens too. And a scheduler on a laptop only posts while the laptop is awake, unless the platform schedules natively or you run the tool on an always-on host.
| Cloud scheduler | Local-first scheduler | |
|---|---|---|
| Where tokens live | The vendor's database or secrets store | A file on your machine |
| Who can use them | The vendor's running service | Processes running as your user |
| What one breach exposes | Many customers at once | One machine |
| Posts when your computer is off | Yes | Only with native platform scheduling or an always-on host |
| Who patches and monitors | The vendor | You |
What can someone do with a leaked token?
With a leaked token, someone can do whatever its scopes allow until it expires or is revoked. RFC 6750, the OAuth bearer token spec, defines a bearer token as one that any party in possession of it can use, with no proof of a key required. So two numbers decide how bad a leak is: the scopes and the lifetime.
Lifetimes vary a lot. As of November 2026, the platforms document these:
| Platform | Documented token lifetime |
|---|---|
| Meta (Facebook, Instagram) | Long-lived user tokens last about 60 days; long-lived Page tokens have no expiration date and end only under certain conditions (Meta) |
| Access tokens 60 days, programmatic refresh tokens one year (Microsoft Learn) | |
| X (OAuth 2.0) | Access tokens two hours by default; with offline.access a refresh token keeps the app connected until you revoke it (X docs) |
| Google (YouTube) | Refresh tokens from an app in "Testing" status with an external user type expire in 7 days, unless only basic profile scopes are requested (Google) |
Any tool that posts unattended needs a credential that outlives a working day. Fair enough. It does mean that revocation, not expiry, is your real off switch.
Which OAuth scopes should I question?
Question any scope that does more than read your profile and publish posts. A scheduler needs to publish. It rarely needs your messages or your ad account. These are the ones I would ask a vendor about, with each platform's own description:
| Scope | What the platform says it allows | Needed to schedule posts? |
|---|---|---|
pages_messaging (Meta) |
Manage and access Page conversations in Messenger | No |
instagram_manage_messages (Meta) |
Read and respond to Instagram Direct messages | No |
ads_management (Meta) |
Read and manage the ad account the app owns | Not for organic posts |
dm.read, dm.write (X) |
Read all your Direct Messages; send and manage them | No |
youtube.force-ssl (Google) |
See, edit, and permanently delete your videos, ratings, comments and captions | Only for comments and captions |
read, write (Mastodon) |
Broad read and write; Mastodon recommends granular scopes instead | Usually write:statuses and write:media are enough |
Sources: Meta permissions reference, X scopes, YouTube scopes, Mastodon scopes.
A broad scope is not proof of bad intent. Some features need one. pendpost's YouTube lane asks for youtube.force-ssl, for example, because posting captions and channel comments requires it. The test is whether the vendor can name the feature behind each scope.
How do I check and revoke app access on each platform?
You revoke access in each platform's account settings, under the list of connected apps. As of November 2026, the official help pages give these paths:
| Platform | Where to revoke |
|---|---|
| Profile picture > Settings & privacy > Settings > Business integrations (under Your activity) > Remove. Apps you logged into with Facebook sit under Apps and websites (Facebook Help Center, "How do I edit the privacy and settings for my business integrations") | |
| More > Settings > Website permissions > Apps and websites > Active > Remove (Instagram Help Center, "How to manage websites or apps connected to your Instagram") | |
| Me > Settings & Privacy > Data privacy > Other applications > Permitted services > Remove (LinkedIn Help) | |
| X | Settings and privacy, then the Apps and sessions section > select the app > Revoke access (X Help) |
| YouTube (Google Account) | Third-party connections page > filter "Access to your Google Account" > select the app > See details > Remove access (Google Help) |
A couple of practical notes. If a tool connected Instagram through your Facebook Page, look in Facebook's Business integrations as well as Instagram's own list. And revoking stops future access only. LinkedIn, Google, Facebook and Instagram all say an app may keep data it already received, so ask the developer to delete it if that matters to you.
Read these lists twice a year. The usual find is an app you tried once, forgot, and that can still post as you.
How does pendpost store your tokens?
pendpost is a free, open-source, local-first scheduler, and its security page states the model in a few lines. It binds 127.0.0.1 by default, your platform keys stay in your own .env file, and nothing phones home. Your tokens go only to the platforms you configure. It also rejects cross-origin browser requests and unknown Host headers, which loopback alone would not stop.
For the questions in this post, two details matter. First, the AI agent that drafts your posts never touches a secret. The MCP setup guide explains that you enter tokens yourself in a local command or the dashboard, which writes .env at mode 0600, and the agent's config tool cannot set a secret at all. Second, if you deliberately run pendpost on a public host, a bearer token gate turns on, as described in the always-on guide.
The trust boundary is your machine. Anything that can read your files as your user can read the credentials, the same as with any tool that keeps keys on disk. For people who would rather not run their own box, there is an optional 24/7 cloud service. It holds tokens encrypted per tenant in a vault, enforces the same approval gate on the server, and lets you move back to self-hosting. So it is the cloud trade from the top of this post, made knowingly, and the local install stays the default. For the publishing side of the same question, see how to let an AI agent post safely.
Originally published on pendpost.com. pendpost is a free, open-source (MIT), local-first social media planner where an AI agent drafts posts behind a human approval gate.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.