Response status codes

Updated

Troubleshoot Media Gateway RESTful API responses by status code.

After sending an HTTP request, the server returns a status code. Use the status code to determine whether the request succeeded and why a request might have failed.

  • If the status code is 2XX, the request was successful.
  • If the status code is not 2XX, the request failed. Troubleshoot the problem based on the message field in the response body.

Streaming key

Status codeMessage exampleReasonSolution
200 OK/Request successful./
400 Bad RequestInvalid settings.Invalid 'channel' format.Streaming key exists in region:na.Request parameter error.Troubleshoot based on the specific content of the message field.
401 UnauthorizedInvalid authentication credentials.RESTful API authentication failed.Retry HTTP Basic or HMAC authentication.
403 ForbiddenMedia Gateway is not enabled for this project. Contact us to enable.Stream does not belong to this app ID.The Media Gateway service has not been activated, or the queried streaming key does not belong to the corresponding app ID.Contact technical support to activate the service, or check whether the streaming key and app ID match.
404 Not FoundResource not found and destroyed.The requested resource does not exist.Check whether the streaming key is correct.
409 ConflictResource with the same name already exists.Too many concurrent requests.Use a backoff strategy and try again.
429 Too Many RequestsRequest rate limit exceeded.Resources quota limit exceeded.No available resources.Request rate or resource quota exceeded.Use a backoff strategy and try again.
500 UnknownInternal error. Contact us to help fix it.Internal server error.Use a backoff strategy and try again.
503 Service UnavailableService overload. Retry with the back-off strategy and contact us to fix it.Service unavailable temporarily. Retry with the back-off strategy.Internal server error.Use a backoff strategy and try again.
504 Gateway TimeoutGateway timeout. Query to check whether the player has been created, or to create another one instead.Internal server error.Use a backoff strategy and try again.

Flow configuration template

Status codeMessage exampleReasonSolution
200 OK/Request successful./
400 Bad RequestInvalid settings.Invalid template ID.Missing field: "transcoding.video.enabled"Unsupported codec: "AV1".Request parameter error.Troubleshoot based on the message field in the response body.
401 UnauthorizedInvalid authentication credentials.RESTful API authentication failed.Retry HTTP Basic or HMAC authentication.
403 ForbiddenMedia Gateway is not enabled for this project. Contact us to enable.Too many templates have been created.The service has not been activated, or too many flow configuration templates have been created.Contact technical support to activate Media Gateway, or delete unused templates.
404 Not FoundStream template not found.The requested resource does not exist.Check whether templateId is correct.
429 Too Many RequestsRequest rate limit exceeded.Resources quota limit exceeded.No available resources.Too many concurrent requests.Use a backoff strategy and try again.
500 UnknownInternal error. Contact us to fix it.Internal server error.Use a backoff strategy and try again.
502 Bad GatewayInternal errors. Contact us to troubleshoot.Internal server error.Use a backoff strategy and try again.
503 Service UnavailableService overload. Retry with the back-off strategy and contact us to fix it.Service unavailable temporarily. Retry with the back-off strategy.Internal server error.Use a backoff strategy and try again.
504 Gateway TimeoutGateway timeout. Query to check whether the task has been created, or to create another one instead.Internal server error.Use a backoff strategy and try again.

Information query

Status codeMessage exampleReasonSolution
200 OK/Request successful./
400 Bad RequestInvalid body.Invalid app ID.SID is missing.Request parameter error.Troubleshoot based on the message field in the response body.
401 UnauthorizedInvalid authentication credentials.RESTful API authentication failed.Retry HTTP Basic or HMAC authentication.
403 ForbiddenMedia Gateway is not enabled for this project. Contact us to enable.The service has not been activated.Contact technical support to activate Media Gateway.
404 Not Found/The requested resource does not exist.Check whether the SID is correct.
429 Too Many RequestsRequest rate limit exceeded.Resources quota limit exceeded.No available resources.Too many concurrent requests.Use a backoff strategy and try again.
500 UnknownSome internal error happened. Contact us to help fix it.Internal server error.Use a backoff strategy and try again.
502 Bad GatewayInternal errors. Contact us for troubleshooting.Internal server error.Use a backoff strategy and try again.
503 Service UnavailableService overload. Retry with a back-off strategy, and contact us to help fix it.Service unavailable temporarily. Retry with back off strategy.Internal server error.Use a backoff strategy and try again.
504 Gateway TimeoutGateway timeout. Query to check whether the task has been created, or to create another one instead.Internal server error.Use a backoff strategy and try again.