UserNotConfirmedException 🔐 Authentication

AWS Cognito: UserNotConfirmedException: User is not confirmed.

The user signed up but hasn’t confirmed their account (email/SMS code), so Cognito won’t let them sign in.

Seen on: REST API

Meaning

Confirmation codes may not arrive (SES sandbox, SMS spending limits) or users ignore them. Admins can confirm users, and apps should offer “resend code”.

Common causes

  • User didn’t enter the verification code
  • Verification emails not delivered (SES sandbox/limits)
  • SMS spending limit reached

⚡ Quick fix

  1. Offer resend: ResendConfirmationCode
  2. Admin-confirm for testing: admin-confirm-sign-up
  3. Configure SES production access for email delivery

Detailed fix by platform

AWS CLI

  1. bash
    aws cognito-idp admin-confirm-sign-up --user-pool-id eu-west-1_abc --username user@example.com
    aws cognito-idp resend-confirmation-code --client-id $CLIENT --username user@example.com

How to diagnose

  1. Status — UserStatus UNCONFIRMED?
  2. Delivery — Email/SMS logs

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.