Single Sign-On Token Errors
On this page
Problem
While attempting to use WHMCS single sign-on to authenticate, users see the following error:
Unable to authenticate with Single Sign-On token for User ID: xx
Cause
This error indicates that the single sign-on token failed authentication for an unspecified reason. The token may be invalid, expired, or corrupted.
Troubleshooting
To troubleshoot the issue, ensure that:
- Token token generation used one of the following methods:
- For API-based single sign-on, confirm that the 
CreateSsoTokenAPI function executed successfully. - For OAuth-based single sign-on, verify that the OAuth Token API Endpoint returned a valid access token.
 
 - For API-based single sign-on, confirm that the 
 - The token has not expired. Single sign-on tokens are single-use and have limited validity periods.
 - The user ID exists and corresponds to a valid client.
 - The client status is Active or Inactive, not Closed.For steps to correct this issue, see Single Sign-On Closed User Errors.
 
Solution
To resolve this error:
- Generate a new single sign-on token using your chosen method.
 - Verify the token generation process completed without errors.
 - Immediately redirect the user to the returned 
redirect_urlor Single Sign-On API Endpoint with the new token. 
If the error persists, check the WHMCS system logs for additional error details.
Last modified: 2025 August 6