Skip to main content

Response Codes

Social Feed uses HTTP response status codes to indicate the success or failure of your API requests. This document provides more information about the following types of error and status messages:

HTTP CodeDescription
2xxSuccess
200Success (OK)
201Successfully created (For POST requests)
4xxClient Errors
400Request was invalid
401Unauthorized
403Forbidden
404Not found
409Conflict request
5xxServer Errors
500Internal server error

Below is a list of possible errors that can be returned, along with additional information about how to resolve them.

Resolve a 400 error code: Request was invalid#

This error indicates that the request body or path parameter or request parameter has invalid input data.

To fix these errors:

  • Check the message field of the exception and adjust your request accordingly.
  • Check our API documentation to see the number and valid values for required items.

Resolve a 401 error code: Unauthorized#

This error can result if the Authorization header is not present or invalid. The value of Authorization header is a token you can get by the authenticating yourself.

To fix these errors:

  • See the Authentication documentation for more information on how to do this.

Resolve a 403 error code: Forbidden#

Forbidan status code indicate that access to the requested resource is denied for some reason

This error can result from any one of the following issues in your code:

  • If the authenticating user is not active.
  • If the authenticating user does not have rights to access the specified organization.
  • If the specified comment does not belong to the authenticating user organization.
  • If the specified post does not belong to the authenticating user organization.
  • If the specified person (gets or) updates post or comments of another person.
  • If the specified person does not belong to the authenticating user organization.

To fix these errors:

  • Check the message field of the exception and adjust your request accordingly.
  • Check our API documentation to see the number and valid values for required items.

Resolve a 409 error code: Conflict request#

Conflict response status code indicates a request conflict with current state of the server. Conflicts are most likely to occur in response to a POST or PUT request. For example, you may get a 409 response when adding a new organization which is a similar one is already saved previously.

This error can result from any one of the following issues in your code:

  • Adding a new organization with an already existing name.
  • Updating an organization to an already existing name.
  • Adding a new category with an already existing name.
  • Updating a category to an already existing name.
  • Liking a post by the same user for more that one time.
  • Liking a comment by the same user for more that one time.

To fix these errors:

  • Check the message field of the exception and adjust your request accordingly.
  • Check our API documentation to see the number and valid values for required items.

Resolve a 404 error code: Not Found#

This error indicates that the requested resource is no longer available at the server.

  • Check the message field of the exception and adjust your request accordingly.
  • Check our API documentation to see the number and valid values for required items.

Resolve a 5XX error: Server errors#

Bankify monitors these errors to make them as rare as possible, but integrations should be able to handle them when they arise.