---
title: Assertion invalid
summary: Code: assertioninvalid
section: errors
order: 7
---
# Assertion invalid

Code: `assertion_invalid`

- HTTP status: 400 Bad Request
- OAuth `error`: `invalid_grant`
- Shown to the end user: Assertion invalid

Request-specific detail for this error goes to the app or developer (API response, developer view, logs). The public page shows only the short message and the code.

## Cause

The jwt-bearer assertion is malformed, expired, signed by an unknown key, has the wrong audience or subject, or the subject is not an enabled user.

## Fix

Sign a fresh assertion with a registered trusted issuer key: iss, sub, aud (the token endpoint), exp and a unique jti.

[All error codes](/errors/index.md)
