Check account health
Checks whether the stored access token for a social account is still valid by calling the network's identity endpoint.
If the token is expired (401), one automatic refresh is attempted and the new tokens are persisted before re-checking.
Supported networks: X, LinkedIn, Facebook, Instagram, Threads, TikTok, YouTube, Pinterest, Bluesky, Google Business
fetch("https://api.outstand.so/v1/social-accounts/string/health", { method: "GET"}){
"success": true,
"data": {
"id": "9dyJS",
"network": "instagram",
"healthy": true,
"checkedAt": "2024-01-01T00:00:00.000Z",
"details": {
"property1": null,
"property2": null
},
"error": "string",
"errorCode": "unauthorized"
}
}{
"success": false,
"error": "Social account not found"
}{
"success": false,
"error": "Internal server error",
"message": "Database connection failed"
}