Error messages

This document identifies some of the error codes and messages that Google APIs return. Specifically, the errors listed here are in the global, or default, domain for Google APIs. Many APIs also define their own domains, which identify API-specific errors that are not in the global domain. For those errors, the value of the domain property in the JSON response will be an API-specific value, such as youtube.parameter.

This page lists errors by their HTTP status codes as defined in RFC 7231.

The sample JSON response below demonstrates how a global error is communicated:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalidParameter",
    "message": "Invalid string value: 'asdf'. Allowed values: [mostpopular]",
    "locationType": "parameter",
    "location": "chart"
   }
  ],
  "code": 400,
  "message": "Invalid string value: 'asdf'. Allowed values: [mostpopular]"
 }
}

Errors

  1. MOVED_PERMANENTLY (301)
  2. SEE_OTHER (303)
  3. NOT_MODIFIED (304)
  4. TEMPORARY_REDIRECT (307)
  5. BAD_REQUEST (400)
  6. UNAUTHORIZED (401)
  7. PAYMENT_REQUIRED (402)
  8. FORBIDDEN (403)
  9. NOT_FOUND (404)
  10. METHOD_NOT_ALLOWED (405)
  11. CONFLICT (409)
  12. GONE (410)
  13. PRECONDITION_FAILED (412)
  14. REQUEST_ENTITY_TOO_LARGE (413)
  15. REQUESTED_RANGE_NOT_SATISFIABLE (416)
  16. EXPECTATION_FAILED (417)
  17. PRECONDITION_REQUIRED (428)
  18. TOO_MANY_REQUESTS (429)
  19. INTERNAL_SERVER_ERROR (500)
  20. NOT_IMPLEMENTED (501)
  21. SERVICE_UNAVAILABLE (503)

MOVED_PERMANENTLY (301)

Error codeDescription
movedPermanentlyThis request and future requests for the same operation have to be sent to the URL specified in the Location header of this response instead of to the URL to which this request was sent.

SEE_OTHER (303)

Error codeDescription
seeOtherYour request was processed successfully. To obtain your response, send a GET request to the URL specified in the Location header.
mediaDownloadRedirectYour request was processed successfully. To obtain your response, send a GET request to the URL specified in the Location header.

NOT_MODIFIED (304)

Error codeDescription
notModifiedThe condition set for an If-None-Match header was not met. This response indicates that the requested document has not been modified and that a cached response should be retrieved. Check the value of the If-None-Match HTTP request header.

TEMPORARY_REDIRECT (307)

Error codeDescription
temporaryRedirectTo have your request processed, resend it to the URL specified in the Location header of this response.

BAD_REQUEST (400)

Error codeDescription
badRequestThe API request is invalid or improperly formed. Consequently, the API server could not understand the request.
badBinaryDomainRequestThe binary domain request is invalid.
badContentThe content type of the request data or the content type of a part of a multipart request is not supported.
badLockedDomainRequestThe locked domain request is invalid.
corsRequestWithXOriginThe CORS request contains an XD3 X-Origin header, which is indicative of a bad CORS request.
endpointConstraintMismatchThe request failed because it did not match the specified API. Check the value of the URL path to make sure it is correct.
invalidThe request failed because it contained an invalid value. The value could be a parameter value, a header value, or a property value.
invalidAltValueThe alt parameter value specifies an unknown output format.
invalidHeaderThe request failed because it contained an invalid header.
invalidParameterThe request failed because it contained an invalid parameter or parameter value. Review the API documentation to determine which parameters are valid for your request.
invalidQueryThe request is invalid. Check the API documentation to determine what parameters are supported for the request and to see if the request contains an invalid combination of parameters or an invalid parameter value. Check the value of the q request parameter.
keyExpiredThe API key provided in the request expired, which means the API server is unable to check the quota limit for the application making the request. Check the Google Developers Console for more information or to obtain a new key.
keyInvalidThe API key provided in the request is invalid, which means the API server is unable to check the quota limit for the application making the request. Use the Google Developers Console to find your API key or to obtain one.
lockedDomainCreationFailureThe OAuth token was received in the query string, which this API forbids for response formats other than JSON or XML. If possible, try sending the OAuth token in the Authorization header instead.
notDownloadOnly media downloads requests can be sent to /download/* URL paths. Resend the request to the same path, but without the /download prefix.
notUploadThe request failed because it is not an upload request, and only upload requests can be sent to /upload/* URIs. Try resending the request to the same path, but without the /upload prefix.
parseErrorThe API server cannot parse the request body.
requiredThe API request is missing required information. The required information could be a parameter or resource property.
tooManyPartsThe multipart request failed because it contains too many parts
unknownApiThe API that the request is calling is not recognized.
unsupportedMediaProtocolThe client is using an unsupported media protocol.
unsupportedOutputFormatThe alt parameter value specifies an output format that is not supported for this service. Check the value of the alt request parameter.
wrongUrlForUploadThe request is an upload request, but it failed because it was not sent to the proper URI. Upload requests must be sent to URIs that contain the /upload/* prefix. Try resending the request to the same path, but with the /upload prefix.

UNAUTHORIZED (401)

Error codeDescription
unauthorizedThe user is not authorized to make the request.
authErrorThe authorization credentials provided for the request are invalid. Check the value of the Authorization HTTP request header.
expiredSession Expired. Check the value of the Authorization HTTP request header.
lockedDomainExpiredThe request failed because a previously valid locked domain has expired.
requiredThe user must be logged in to make this API request. Check the value of the Authorization HTTP request header.

PAYMENT_REQUIRED (402)

Error codeDescription
dailyLimitExceeded402A daily budget limit set by the developer has been reached.
quotaExceeded402The requested operation requires more resources than the quota allows. Payment is required to complete the operation.
user402The requested operation requires some kind of payment from the authenticated user.

FORBIDDEN (403)

Error codeDescription
forbiddenThe requested operation is forbidden and cannot be completed.
accessNotConfiguredYour project is not configured to access this API. Please use the Google Developers Console to activate the API for your project.
accessNotConfiguredThe project has been blocked due to abuse. See http://support.google.com/code/go/developer_compliance.
accessNotConfiguredThe project has been marked for deletion.
accountDeletedThe user account associated with the request's authorization credentials has been deleted. Check the value of the Authorization HTTP request header.
accountDisabledThe user account associated with the request's authorization credentials has been disabled. Check the value of the Authorization HTTP request header.
accountUnverifiedThe email address for the user making the request has not been verified. Check the value of the Authorization HTTP request header.
concurrentLimitExceededThe request failed because a concurrent usage limit has been reached.
dailyLimitExceededA daily quota limit for the API has been reached.
dailyLimitExceededThe daily quota limit has been reached, and the project has been blocked due to abuse. See the Google APIs compliance support form to help resolve the issue.
dailyLimitExceededUnregThe request failed because a daily limit for unauthenticated API use has been hit. Continued use of the API requires signup through the Google Developers Console.
downloadServiceForbiddenThe API does not support a download service.
insufficientAudienceThe request cannot be completed for this audience.
insufficientAuthorizedPartyThe request cannot be completed for this application.
insufficientPermissionsThe authenticated user does not have sufficient permissions to execute this request.
limitExceededThe request cannot be completed due to access or rate limitations.
lockedDomainForbiddenThis API does not support locked domains.
quotaExceededThe requested operation requires more resources than the quota allows.
rateLimitExceededToo many requests have been sent within a given time span.
rateLimitExceededUnregA rate limit has been exceeded and you must register your application to be able to continue calling the API. Please sign up using the Google Developers Console.
responseTooLargeThe requested resource is too large to return.
servingLimitExceededThe overall rate limit specified for the API has already been reached.
sslRequiredSSL is required to perform this operation.
unknownAuthThe API server does not recognize the authorization scheme used for the request. Check the value of the Authorization HTTP request header.
userRateLimitExceededThe request failed because a per-user rate limit has been reached.
userRateLimitExceededUnregThe request failed because a per-user rate limit has been reached, and the client developer was not identified in the request. Please use the Google Developer Console (https://console.developers.google.com) to create a project for your application.
variableTermExpiredDailyExceededThe request failed because a variable term quota expired and a daily limit was reached.
variableTermLimitExceededThe request failed because a variable term quota limit was reached.

NOT_FOUND (404)

Error codeDescription
notFoundThe requested operation failed because a resource associated with the request could not be found.
notFoundA resource associated with the request could not be found. If you have not used this API in the last two weeks, please re-deploy the App Engine app and try calling it again.
unsupportedProtocolThe protocol used in the request is not supported.

METHOD_NOT_ALLOWED (405)

Error codeDescription
httpMethodNotAllowedThe HTTP method associated with the request is not supported.

CONFLICT (409)

Error codeDescription
conflictThe API request cannot be completed because the requested operation would conflict with an existing item. For example, a request that tries to create a duplicate item would create a conflict, though duplicate items are typically identified with more specific errors.
duplicateThe requested operation failed because it tried to create a resource that already exists.

GONE (410)

Error codeDescription
deletedThe request failed because the resource associated with the request has been deleted

PRECONDITION_FAILED (412)

Error codeDescription
conditionNotMetThe condition set in the request's If-Match or If-None-Match HTTP request header was not met. See the ETag section of the HTTP specification for details. Check the value of the If-Match HTTP request header.

REQUEST_ENTITY_TOO_LARGE (413)

Error codeDescription
backendRequestTooLargeThe request is too large.
batchSizeTooLargeThe batch request contains too many elements.
uploadTooLargeThe request failed because the data sent in the request is too large.

REQUESTED_RANGE_NOT_SATISFIABLE (416)

Error codeDescription
requestedRangeNotSatisfiableThe request specified a range that cannot be satisfied.

EXPECTATION_FAILED (417)

Error codeDescription
expectationFailedA client expectation cannot be met by the server.

PRECONDITION_REQUIRED (428)

Error codeDescription
preconditionRequiredThe request requires a precondition that is not provided. For this request to succeed, you need to provide either an If-Match or If-None-Match header with the request.

TOO_MANY_REQUESTS (429)

Error codeDescription
rateLimitExceededToo many requests have been sent within a given time span.

INTERNAL_SERVER_ERROR (500)

Error codeDescription
internalErrorThe request failed due to an internal error.

NOT_IMPLEMENTED (501)

Error codeDescription
notImplementedThe requested operation has not been implemented.
unsupportedMethodThe request failed because it is trying to execute an unknown method or operation.

SERVICE_UNAVAILABLE (503)

Error codeDescription
backendErrorA backend error occurred.
backendNotConnectedThe request failed due to a connection error.
notReadyThe API server is not ready to accept requests.