Accounts
Get Account Stats
Returns live audience counts, such as followers and likes, for TikTok, Instagram, Facebook and Bluesky accounts. A count the platform does not report is null.
BearerAuthorizationBearer <op_>Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.
id*string1 <= lengthAccount stats
application/json- response
accountId*stringplatform*|The platform id. New platforms can be added, so handle a value you do not know.
followerCount*|Followers. Null when the platform does not report it.
followingCount*|Accounts this account follows. Null when the platform does not report it.
likesCount*|TikTok: likes across the account's videos. Facebook: people who like the Page. Null on other platforms.
videoCount*|Published posts. Videos on TikTok, media on Instagram and posts on Bluesky. Null on other platforms.
fetchedAt*stringdate-timeimport { Configuration, AccountsApi } from "@onepostly/sdk";const accountsApi = new AccountsApi( new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await accountsApi.getAccountStats({ id: "acc_YOUR_INSTAGRAM_ACCOUNT_ID",});console.log(response);{ "accountId": "acc_YOUR_INSTAGRAM_ACCOUNT_ID", "platform": "instagram", "followerCount": 12480, "followingCount": 318, "likesCount": null, "videoCount": 642, "fetchedAt": "2027-03-15T10:00:00.000Z"}Reconnect Account
Renews an account's authorization. For OAuth platforms the response has type oauth and url, where the account owner signs in again with the same account. For Bluesky, send identifier and appPassword and the response has type account and the reconnected account. Reconnecting never adds a billed account.
List Account Media
Lists the account's posts on the platform, newest first, for X, Instagram, Facebook, Threads, TikTok, YouTube and Bluesky. The first page also includes the account's recent posts published through Onepostly. A count or length the platform does not report is null. Instagram also lists active stories with kind stories.