Get the post sync status of a connected account
curl --request GET \
--url https://api.social-api.ai/v1/accounts/{account_id}/sync \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.social-api.ai/v1/accounts/{account_id}/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/accounts/{account_id}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"error": "",
"finished_at": "2023-11-07T05:31:56Z",
"last_synced_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"state": "syncing"
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Accounts
Get the post sync status of a connected account
Reports whether a post sync is running for the account and when its posts were last refreshed. Poll this after POST /accounts//sync until state leaves “syncing”. A failed sync carries the reason in error.
GET
/
accounts
/
{account_id}
/
sync
Get the post sync status of a connected account
curl --request GET \
--url https://api.social-api.ai/v1/accounts/{account_id}/sync \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.social-api.ai/v1/accounts/{account_id}/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/accounts/{account_id}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"error": "",
"finished_at": "2023-11-07T05:31:56Z",
"last_synced_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"state": "syncing"
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}