Response status codes

Updated

Troubleshoot RTC REST API requests by response status code.

This page describes the response status codes returned by the RTC REST APIs.

If the status code is 200, the request is successful. If not, troubleshoot the problem based on the message and reason fields that may appear in the response body.

For example, when a request fails, you might receive the following response:

{
  "message": "invalid appid"
}

Status codes

Response status codeDescriptionRecommended action
200The operation is successful.No troubleshooting required.
400Bad request.Troubleshoot based on the message field in the response body.
401Unauthorized.Check that the authentication information is correct. Possible causes include an App ID that does not exist, or a customer ID and secret that do not match.
403Access is forbidden.The authorization information is incorrect. Contact Agora technical support.
404The requested resource could not be found.Confirm that the requested URL and resource are correct.
415Unsupported media type.Make sure the Content-Type request header is set to application/json.
429Too many requests.Wait and retry.
500Internal server error.Use a backoff strategy for query requests, or contact Agora technical support.

If the problem is not solved after taking the recommended action, print the X-Request-ID and X-Resource-ID response header values and contact Agora technical support.

Troubleshooting example

A call to create a privilege banning rule returns 400 Bad Request, and the message field is invalid appid.

This means that the App ID is invalid and rule creation failed. Get the App ID in Agora Console and call the API again.