HTTP

HTTP 226 IM Used vs 401 Unauthorized

HTTP 226 (IM Used) is a 2xx Success response, while 401 (Unauthorized) is a 4xx Client Error response. 226 indicates that the server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations. In contrast, 401 means that the request requires user authentication. The response includes a WWW-Authenticate header indicating the authentication scheme.

Description

The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations.

When You See It

When using delta encoding to reduce bandwidth.

How to Fix

Rarely encountered. The response uses Instance Manipulations (IM) as specified.

Description

The request requires user authentication. The response includes a WWW-Authenticate header indicating the authentication scheme.

When You See It

When accessing a protected resource without credentials or with expired tokens.

How to Fix

Include valid authentication credentials (API key, Bearer token, Basic auth) in the Authorization header.

Key Differences

1.

226 is a 2xx Success response, while 401 is a 4xx Client Error response.

2.

HTTP 226: The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations.

3.

HTTP 401: The request requires user authentication. The response includes a WWW-Authenticate header indicating the authentication scheme.

4.

You encounter 226 when when using delta encoding to reduce bandwidth.

5.

You encounter 401 when when accessing a protected resource without credentials or with expired tokens.

When to Use Which

For 226 (IM Used): Rarely encountered. The response uses Instance Manipulations (IM) as specified. For 401 (Unauthorized): Include valid authentication credentials (API key, Bearer token, Basic auth) in the Authorization header.

Learn More