Channels
List channels
The social accounts connected to your team that you can post to. Use an account’s id as socialAccountId when you create posts.
GET
/
accounts
List channels
curl --request GET \
--url https://api.postploy.com/public/v1/accounts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.postploy.com/public/v1/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.postploy.com/public/v1/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "5b0f4c3e-8a2d-4c51-9e7a-1d2f3a4b5c6d",
"platform": "linkedin",
"name": "Halo Coffee",
"username": "halo-coffee",
"profileImage": "https://cdn.example.com/halo.png",
"needsReconnect": false,
"lastError": null
},
{
"id": "0c9e8d7f-6a5b-4c3d-8e2f-1a0b9c8d7e6f",
"platform": "twitter",
"name": "Halo Coffee",
"username": "halocoffee",
"profileImage": "https://cdn.example.com/halo.png",
"needsReconnect": false,
"lastError": null
}
]
}{
"statusCode": 401,
"message": "Invalid API key",
"errors": null,
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/accounts"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}⌘I
List channels
curl --request GET \
--url https://api.postploy.com/public/v1/accounts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.postploy.com/public/v1/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.postploy.com/public/v1/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "5b0f4c3e-8a2d-4c51-9e7a-1d2f3a4b5c6d",
"platform": "linkedin",
"name": "Halo Coffee",
"username": "halo-coffee",
"profileImage": "https://cdn.example.com/halo.png",
"needsReconnect": false,
"lastError": null
},
{
"id": "0c9e8d7f-6a5b-4c3d-8e2f-1a0b9c8d7e6f",
"platform": "twitter",
"name": "Halo Coffee",
"username": "halocoffee",
"profileImage": "https://cdn.example.com/halo.png",
"needsReconnect": false,
"lastError": null
}
]
}{
"statusCode": 401,
"message": "Invalid API key",
"errors": null,
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/accounts"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}