Accounts API Reference
Accounts are one to one mapping to social accounts you have connected in the dashboard.
List accounts
Section titled “List accounts”GET /accounts
Returns all connected accounts.
Query parameters
Section titled “Query parameters”| Name | Type | Required | Description |
|---|---|---|---|
account_group_id | integer | No | Only return accounts belonging to the specified account group. |
Example
Section titled “Example”curl -X GET "https://api.postproxy.dev/v1/accounts" \ -H "Authorization: Bearer YOUR_API_KEY"import Postproxy from postproxy
client = Postproxy(api_key="YOUR_API_KEY")
accounts = client.get_accounts()print(accounts)require 'postproxy'
client = Postproxy.new("YOUR_API_KEY")
accounts = client.get_accounts()pp accountsimport Postproxy from 'postproxy';
const client = new Postproxy("YOUR_API_KEY");
accounts = await client.getAccounts();console.log(accounts)Response:
[ { "id": "777", "name": "My Facebook Account", "type": "facebook", "username": "myfb" }, { "id": "778", "name": "My Instagram Account", "type": "instagram", "username": "myinsta" }]Get account
Section titled “Get account”GET /account/{account_id}
Returns a single account by its unique identifier.
Query parameters
Section titled “Query parameters”| Name | Type | Required | Description |
|---|---|---|---|
account_id | integer | Yes | The unique ID of the account to retrieve. |
Example
Section titled “Example”curl -X GET "https://api.postproxy.dev/v1/accounts/777" \ -H "Authorization: Bearer YOUR_API_KEY"import Postproxy from postproxy
client = Postproxy(api_key="YOUR_API_KEY")
account = client.get_account(777)print(account)require 'postproxy'
client = Postproxy.new("YOUR_API_KEY")
account = client.get_account(777)pp accountimport Postproxy from 'postproxy';
const client = new Postproxy("YOUR_API_KEY");
account = await client.getAccount(777);console.log(account)Response:
{ "id": "777", "name": "My Facebook Account", "type": "facebook", "username": "myfb"}