Main Content

Error Codes

HTTP Status

Message

Details

Error Code

400

Bad Request

The request cannot be fulfilled due to bad syntax. See REST API Reference for the correct syntax.

error_bad_request

401

Authorization Required

The authentication details are incorrect. Provide the correct channel API key or user API key. See Channel Data Control and ThingSpeak API Keys for information on API keys.

error_auth_required

402

Payment Required

You have exceeded the message limit for the ThingSpeak license.

error_payment_required

404

Resource Not Found

The requested resource was not found. Check the URL and try again.

error_resource_not_found

405

Method Not Allowed

Use the proper HTTP method for this request. See REST API Reference for the allowed methods.

error_method_invalid

409

Conflict

The request is in conflict with the current state of the targeted resource. Try your request again or change the request to resolve the conflict.

error_conflict

413

Request Entity Too Large

Your request is too large. Reduce the size and try again.

error_request_too_large

421

No Action Performed

The server attempted to process your request, but has no action to perform.

error_no_action

422

Unprocessable Entity

Please check your inputs to ensure that all inputs contain only valid UTF-8 encoded data.

error_invalid_byte_sequence

429

Too Many Requests

Wait before making another request. See How to Buy and Frequently Asked Questions for specific rate limits.

error_too_many_requests

500

Internal Server Error

An unexpected condition was encountered.

 

502

Bad Gateway

The server received an invalid response from the upstream server. Check your network connection and try again.

 

503

Service Unavailable

The server was unavailable or unable to process your request. Try your request later.

 

All errors are sent with their corresponding HTTP status code.

For more information, see "Return Codes" at ThingSpeak Communication Library for Arduino, ESP8266 and ESP32.

Text

Example error response: error_auth_required.

JSON

The response is a JSON error object, for example:

{
  "status": "401",
  "error":
  {
    "error_code": "error_auth_required",
    "message": "Authorization Required",
    "details": "Please make sure that your API key is correct."
  }
}

XML

The response is an XML error object, for example:

<?xml version="1.0" encoding="UTF-8"?>
<error>
  <error-code>error_auth_required</error-code>
  <message>Authorization Required</message>
  <details>Please make sure that your API key is correct.</details>
</error>