Validates the provided Bearer token and returns user information. This endpoint is useful for testing your authentication setup and verifying that your integration key is working correctly.
Cause: Authorization header is present but the token value after “Bearer ” is emptySolution: Ensure your integration key is properly set in your environment or configuration
Copy
// Check your environment variable is setconsole.log(process.env.CARDCLAN_API_KEY); // Should not be undefinedconst headers = { 'Authorization': `Bearer ${process.env.CARDCLAN_API_KEY}`};
404 - Invalid bearer token - user not found
Cause: The integration key is not valid or doesn’t exist in our systemSolution:
Verify you’re using the correct integration key
Check if the key was regenerated and update your configuration
Generate a new key if necessary using the Create Key endpoint