'Snowflake SQP-API : issue with short token expiry period

I have a requirement where I need to communicate with Snowflake Sql-Api in the back-end from my application. As I come across the snowflake sql-api documentation, it supports authentication using either oauth access token or JWT token generated with keyvaluepair. For this, I am having a configuration property in my application to configure the access token with customer in properties file.

However, I see that oauth token generated has maximum expire period of 10 minutes and JWT token has maximum expire period of 60 minutes. In our use-case having the shorter expiry period is not feasible as user can't change the properties file regularly and restart my application.

I would like to know what is the way to have access token configured with long expiry period like 30/90 days etc or the way I can communicate with snowflake sql-api as per my use case.

Looking forward to hear from you. Thanking you in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source