---
title: "FORBIDDEN"
description: "What triggers a FORBIDDEN error (HTTP 403) and how to resolve access issues."
canonical_url: "https://docs.leyr.io/api/error-handling/forbidden"
---
# FORBIDDEN

> What triggers a FORBIDDEN error (HTTP 403) and how to resolve access issues.

## Summary

Corresponds to a standard `403 Forbidden` HTTP response status

> The request was a valid request, but the server is refusing to respond to it. Unlike `401 Unauthorized`, authenticating will not change the outcome - the credentials you provided do not have access to the requested resource.

## Example Response

```json
{
    "code": "FORBIDDEN",
    "type": "https://docs.leyr.io/api/error-handling/forbidden",
    "title": "Forbidden",
    "status": 403,
    "detail": "Forbidden. The request was a valid request, but the server is refusing to respond to it.",
    "instance": "36b5909e-4391-4520-b303-84cbb80c4264"
}
```

## Common Causes

- The EHR credentials configured for the instance do not have permission to access the requested data
- The EHR responded with a data access error for the requested resource
- The auth token provided for the request is corrupted or invalid

## Resolution Steps

1. Check the `errors` array in the response body for a specific `error_code`, such as `NO_DATA_ACCESS` or `CORRUPTED_OR_INVALID_TOKEN`. See [Error Codes](https://docs.leyr.io/api/error-handling/error_codes) for the full list.
2. Verify that the credentials configured in the [Developer Portal](https://leyr.io/developers/apps/) have access to the care unit and resource you are requesting.
3. If the issue persists, contact our support team at [contact@leyr.io](mailto:contact@leyr.io) with the `instance` ID from the error response.


## Sitemap

See the full [sitemap](https://docs.leyr.io/sitemap.md) for all pages.
