GSTN had made available below APIs as Taxpayer APIs which can be used by the taxpayer, requiring tax payer's authentication. Once authenticated, the taxpayer can get cash and ITC balance ledgers, upload GSTR JSON to GST portals to file GST returns
In order to access data for the taxpayer, authenticate the taxpayer by OTP verification. On successful verification, you are granted with short access of 6 hrs and a longer session (maximum of 30 days; configurable on GST portal). You can call any APIs to fetch the data from GSTN with valid access. Refresh Taxpayer access API will extend the access additionally by 6 hrs from the time of the request. An extension can be requested with valid access and up to session expiry time. So the user can refresh till 6 hrs from the start of the access after that Refresh access API will not work and the taxpayer session has to be again started with OTP verification.