Skip to main content

Status and error codes

This document lists the response status codes for Cloud Transcoding and Multi-bitrate streaming, along with their descriptions and recommended actions.

Cloud Transcoding

When you call the RESTful API, you receive the following HTTP response status codes:

  • If the HTTP status code is 2XX, the request is successful.
  • If the HTTP status code is not 2XX, the request failed.

The following is a sample response for a failed request:


_4
// 400 Bad Request
_4
{
_4
"message": "appid is invalid"
_4
}

When using the Cloud Transcoding Service, you may receive status codes that indicate the service status. Refer to the following table to understand their meanings and take appropriate action:

Status CodeDescriptionSuggested Actions
200 OKThe request was successful.No troubleshooting is required.
201 Created (Deprecated)The task is already in progress. Do not use the same builderToken to start the task again.No troubleshooting is required.
202 AcceptedThe server has received the task request, but it does not mean that the execution is complete.Query the execution status before proceeding to the next business operation.
400 Bad Request
  • The request syntax is incorrect.
  • The parameter value does not meet the requirements.
  • Your App ID does not have the cloud transcoding service enabled.
Investigate further based on the message field in the response body.
401 UnauthorizedThe Authorization field for HTTP Basic Authentication is invalid.Refer to Implementing HTTP Basic Authentication or check your Authorization credentials.
403 ForbiddenThe cloud transcoding service is not enabled for your App ID.Contact technical support to activate it.
404 Not FoundTranscoder not found.Use a backoff strategy to make a query request to confirm whether the transcoder is created successfully.
409 ConflictA transcoder task with the same instanceId already exists.If you want to create a new transcoder, delete the existing transcoder first.
429 Too Many RequestsThe request rate exceeds the upper limit.Wait for a while and try again.
500 Internal Server ErrorInternal Agora server error.Use a backoff strategy for query requests or contact technical support.
501 Not ImplementedThis method is not implemented.No troubleshooting required.
503 Service UnavailableThe Agora server is temporarily overloaded or undergoing maintenance.Use a backoff strategy for query requests or contact technical support.
504 Gateway Timeout
  • An internal error occurred on the Agora server.
  • The server, acting as a gateway or proxy, did not get the request from the upstream server.
  • The upstream server is shut down.
Use a backoff strategy for query requests or contact technical support.

When using the Cloud Transcoding response status code for troubleshooting, keep the following in mind:

  • If the request fails, do not perform any logical processing on the content of the message field in the response body. Instead, rely primarily on the status code for troubleshooting.
  • If the troubleshooting methods in the table do not resolve the issue, contact technical support with the values of the X-Request-ID and X-Resource-ID fields in the response header.
  • If you receive a 404 status code after a Create request has returned successfully and you have not called the Delete method, or if the transcoder remains idle beyond the idleTimeout parameter value in the request, use a backoff algorithm. Retry at increasing intervals of 5, 10, and 15 seconds to call the Query method for confirmation.
  • A 5XX response status code usually indicates an issue in the server’s response process. Refer to the following recommended actions:
    • Use a backoff strategy for query requests. Retry at increasing intervals of 5, 10, and 15 seconds to query the service status.
    • Contact technical support.