20154: Invalid Claim Set
API, IAM
ERROR
This error indicates that the JWT was parsed successfully, but one or more claims in the payload are invalid.
- One of the required claims is missing from the payload.
- For Public Key Client Validation, the payload must include the
hrhandrqhclaims;hrhis the semicolon-delimited list of lowercase headers used in the request-hash calculation (must at least includeHostandAuthorization), andrqhis the hash of the canonicalized HTTP request. Omitting or misformatting these claims will invalidate the set. - For Public Key Client Validation, required payload claims include
iss,sub, andexp; tokens received afterexp(allowing for clock skew) or withexp - nbfexceeding the documented maximum are rejected, which makes the claim set invalid.
- Ensure you are using the latest Twilio Helper Library so required JWT claims are produced correctly.
- When using Public Key Client Validation:
- Include both
hrhandrqhin the payload; ensurehrhlistsHostandAuthorization. - Attach the JWT on requests via the
Twilio-Client-Validationheader. - Verify
iss,sub,exp, and (if used)nbfsatisfy the documented constraints, including the maximum allowedexp - nbfwindow.
- Include both
- If you only need to confirm that the token is well-formed (structure/signature presence), use a standard JWT inspection tool before retesting.