Accounts
Get Account
BearerAuthorizationBearer <op_>Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.
id*string1 <= lengthAccount
application/json- response
id*stringplatform*|The platform id. New platforms can be added, so handle a value you do not know.
displayName*stringhandle*stringThe account's handle on the platform, without a leading @. LinkedIn has no handles, so a LinkedIn account has its name here.
avatarUrl*|uristatus*|active works normally. expired, revoked and error need a reconnect before the account can publish again. expired also covers an authorization that ran out and cannot renew by itself. A disconnected account is no longer returned. The account.disconnected webhook sends it as a DisconnectedAccount. New values can be added, so handle a value you do not know.
canAutoRenew*booleanWhether the authorization renews without the account owner signing in again.
tokenExpiresAt*|When the current authorization expires, or null when it does not.
date-timeprofile*|The name of the profile the account is filed under. null when the account is in no profile.
metadata*The metadata sent with the connect that added the account. An empty object when none was sent.
xSubscriptionType?|X only, such as Premium. The account's X subscription, which sets its post length limit. Null when X does not report it, and left out for other platforms.
createdAt*stringdate-timeupdatedAt*stringdate-timeimport { Configuration, AccountsApi } from "@onepostly/sdk";const accountsApi = new AccountsApi( new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await accountsApi.getAccount({ id: "acc_YOUR_LINKEDIN_ACCOUNT_ID",});console.log(response);{ "id": "acc_YOUR_LINKEDIN_ACCOUNT_ID", "platform": "linkedin", "displayName": "Your Brand", "handle": "Your Brand", "avatarUrl": "https://cdn.onepostly.com/avatars/yourbrand.jpg", "status": "active", "canAutoRenew": false, "tokenExpiresAt": "2027-04-30T10:00:00.000Z", "profile": "Default", "metadata": {}, "createdAt": "2027-03-01T10:00:00.000Z", "updatedAt": "2027-03-01T10:00:00.000Z"}