CoAP response codes

nRF93M1 Cellular AT Commands

CoAP response codes indicate the result of a CoAP request made by the modem to a cloud endpoint.

A CoAP response code is a single integer that encodes both a class and a detail value using the integer = (class × 32) + detail formula conventionally written as c.dd. A response is successful when the class is 2. Any other class indicates an error.

To decode an integer code, divide it by 32 to get the class. The remainder is the detail. For example, 129 = (4 × 32) + 1 gives 4.01 Unauthorized.

The <coap_code> parameter and its defined values are the following:

<coap_code>
Integer. CoAP response code.
-1 – No CoAP response received. Connection or transport failure before the server replied.
65 (2.01) – Created. Chunk accepted, new resource created.
68 (2.04) – Changed. Chunk accepted.
69 (2.05) – Content. Request succeeded with response body.
128 (4.00) – Bad request. Malformed chunk data.
129 (4.01) – Unauthorized. Invalid or missing project key.
131 (4.03) – Forbidden.
132 (4.04) – Not found. Wrong endpoint URL.
141 (4.13) – Request entity too large. Chunk exceeded server limit.
160 (5.00) – Internal server error.
163 (5.03) – Service unavailable. Cloud observability backend temporarily unavailable.
164 (5.04) – Gateway timeout.