Ayrshare Error Codes

The REST API will include a response with a list of errors if applicable.

Error have a returned status code of 400, 401, 403, 404, 429, or 500. Success has a returned status code 200. See here for details.

Errors are often dynamic and specific to the API call made.

For example, a post that is considered a duplicate by Twitter and Facebook would return the following response.

{
"status": "error",
"errors": [
{
"action": "post",
"status": "error",
"code": 110,
"message": "Status is a duplicate.",
"post": "Today is a great day",
"platform": "twitter"
},
{
"action": "post",
"status": "error",
"code": 107,
"message": "Facebook Error: This status update is identical to the last one you posted. Try posting something different, or delete your previous update.",
"platform": "facebook"
}
],
"postIds": [],
"id": "6APU4qqI7XO7JM3BOy6B"
}

Please note:

  • The errors field contains the array of errors, one per social network that had an error.

  • The action refers to the type of error returned.

  • The top-level status field will be "error" if the API call failed. For example, for a /post call if all social network posting were successful the status field will be "success", else the status field will be "error".

  • The code field contains the Ayrshare reference error code.

  • the message field is the specific details of the error.