> ## Documentation Index
> Fetch the complete documentation index at: https://smartcar.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication Errors

> Thrown when there is an issue with your authorization header.

# `UNAUTHORIZED`

The authorization header is missing or malformed, or it contains invalid or expired authentication credentials (e.g. access token, client ID, client secret). Please check for missing parameters, spelling and casing mistakes, and other syntax issues.

```json UNAUTHORIZED theme={null}
{
      "errors": [
        {
            "links": {
                "about": "https://smartcar.com/docs/errors/api-errors/authentication-errors#null"
            },
            "status": "401",
            "type": "AUTHENTICATION",
            "code": "UNAUTHORIZED",
            "title": "Unauthorized",
            "detail": "The Authorization token is missing or invalid."
        }
    ]
}
```

### Suggested Resolution

Ensure your Authentication header is present in the `Bearer {token}` format.
Use the token endpoint to get a new access token.

### Troubleshooting Steps

Refer to our API reference and ensure that you use the correct authentication mechanism for your request

* Check constants like Bearer for spelling mistakes.
* Use the [oauth2/token](/api-reference/authorization/request-access-token) endpoint to get a new access token. Access tokens over an hour old have likely expired.

# `ACCESS_DENIED`

The provided token does not have access to the request resource or path

```json ACCESS_DENIED theme={null}
{
    "errors": [
        {
            "status": "403",
            "type": "AUTHENTICATION",
            "code": "ACCESS_DENIED",
            "title": "Access Denied",
            "detail": "The given token does not provide access to the requested resource."
        }
    ]
}
```

### Suggested Resolution

Ensure you are requesting valid resources for the application associated with the given access token. Ensure your request path is valid.
