Error Handling at Leyr
UNAUTHORIZED
UNAUTHORIZED
Summary
This error corresponds to the standard 401 Unauthorized HTTP status code, indicating that the request lacks valid authentication credentials for the requested resource.
Example Response
{
    "code": "UNAUTHORIZED",
    "type": "https://docs.leyr.io/api/error-handling/unauthorized",
    "title": "Unauthorized",
    "status": 401,
    "detail": "Application with the provided client ID was not found.",
    "instance": "36f6904c-fd11-4ea9-8f74-a103fc829bd1"
}
Common Causes
- Missing 
x-leyr-client-idheader in the request - Invalid 
x-leyr-client-idheader - the specified application ID doesn't exist - Incorrect authentication credentials for the requested endpoint
 
Resolution Steps
To resolve this error:
- Check the 
detailfield in the response body. It contains specific information about the authentication issue, following the Pydantic error message standard, including which parameter is missing and where (e.g. body, query, path, etc). It will also hint if you are trying to send in a value that is not allowed in a certain parameter. - Verify your request against our API Reference, paying particular attention to the required headers for each endpoint.
 - Go to Developer portal and double-check the Client Id of application you are using.
 - If the issue persists, contact our support team at contact@leyr.io with:
- The 
instanceID from your error response - The endpoint you're trying to access
 - A copy of your request headers (excluding sensitive data)
 
 - The