Account allows a user to authenticate (does not imply authorization) to system services and be granted authorization to access them;. To log into an account, a user is typically required to authenticate oneself with a password or other credentials for the purposes of accounting, security, logging, and resource management.
NSDL APIS has Java sample code. https://onlineservices.tin.egov-nsdl.com/TIN/JSP/security/DownloadCodesForOPV.jsp
account pan permanent