External access control to the user portal

Hello.

I have my own API that validates if a user is correct. I would like to know if when a user logs in to the freshdesk user portal, an API call can be made that returns whether the user is valid to access the portal or not.

Thanks!