• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

How to Resolve 'Your Account Has Expired' Errors in FusionAuth

Scheduled Pinned Locked Moved Solved
Q&A
integration
1
2
929
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W
    wesley
    last edited by 30 Dec 2024, 20:46

    We are trying to authorize a user, but when attempting to log in using their credentials, we receive the error message: "Your account has expired." Additionally, we are unable to reset the account expiry date through the FusionAuth portal's user page.

    How can we extend the user's account expiry date?

    W 1 Reply Last reply 31 Dec 2024, 14:00 Reply Quote 0
    • W
      wesley @wesley
      last edited by 31 Dec 2024, 14:00

      To update or extend a user’s account expiry date, you can use the FusionAuth User API to modify the expiry field. You can either set a new expiration date or set the field to null to remove the expiry entirely.

      Here’s an example of a PATCH request to update this field:

      curl --request PATCH \
        --url https://local.fusionauth.io/api/user/42661043-9ab8-4bb8-8778-85217aa05086 \
        --header 'Authorization: TulwCDDOmOtvXAVTsRUI4LfSWlF-Bd78uTnQhgviMQG9a1a3Qn7emwBn' \
        --header 'Content-Type: application/json' \
        --header 'X-FusionAuth-TenantId: 30665132-6767-6665-3132-323466613934' \
        --data '{
          "user": {
            "expiry": null
          }
        }'
      

      Explanation:
      Replace the URL, user ID, and tenant ID with your instance's values.
      Setting "expiry": null removes the expiration date and reactivates the user account.
      This should resolve the issue and allow the user to log in again.

      1 Reply Last reply Reply Quote 0
      • W wesley has marked this topic as solved on 31 Dec 2024, 14:01
      2 out of 2
      • First post
        2/2
        Last post