Accounts
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.
BearerAuthorizationBearer <op_>Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.
id*string1 <= lengthIdempotency-Key?stringA unique key, such as a UUID, that makes retrying this request safe. A repeat with the same key and body within 24 hours returns the first response instead of acting again. A 429 or 5xx response is not kept, so a retry with the same key runs again.
1 <= length <= 255application/json- body
redirectUrl?stringWhere the browser returns after the owner signs in again. Required with an API key. Ignored for Bluesky.
uriidentifier?stringBluesky only. The account's handle, email or DID.
1 <= length <= 253appPassword?stringBluesky only. A new App Password for the account.
1 <= length <= 200Authorization URL, or the reconnected Bluesky account
application/json- response
The answer for an OAuth platform. The account owner signs in again at url.
type*"oauth"Always oauth.
"oauth"url*stringWhere the account owner signs in again.
uriexpiresAt*stringWhen url stops working, in ISO 8601. A sign-in that finishes later returns to redirectUrl with error=SESSION_EXPIRED. Reconnect again then.
date-timeimport { Configuration, AccountsApi } from "@onepostly/sdk";const accountsApi = new AccountsApi( new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await accountsApi.reconnectAccount({ id: "acc_YOUR_LINKEDIN_ACCOUNT_ID", reconnectAccountBody: { "redirectUrl": "https://yourapp.com/oauth/onepostly" },});console.log(response);{ "type": "oauth", "url": "https://www.linkedin.com/oauth/v2/authorization?response_type=code&state=eyJhbGciOiJIUzI1NiJ9", "expiresAt": "2027-03-15T10:10:00.000Z"}Disconnect Account
Disconnects the account. On YouTube, Onepostly's access is also withdrawn on the platform. Its published posts stay on the platform, and its posts in Onepostly keep their history.
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.