SYSTEM$GET_SERVICE_CALLER_TOKEN_EXPIRY
functionsupportedContainer services & dev toolingReturns the expiration timestamp of a caller’s rights login token for a Snowpark Container Services service. Snowpark Container Services is available to accounts in AWS, Microsoft Azure, and Google Cloud Platform commercial regions, with some exceptions. For more information, see Available regions and considerations.
Syntax
SYSTEM$GET_SERVICE_CALLER_TOKEN_EXPIRY( '<token_string>' )
Parameters
| Name | Required | Description |
|---|---|---|
token_string | required | The caller’s rights login token string, obtained from the Sf-Context-Current-User-Token HTTP header that Snowflake passes to the service container. |
Returns
Returns a timestamp string representing the expiration time of the token (for example, 2026-07-18T14:30:00Z).
Usage notes
- This function can be called by the service application to determine when the caller token will expire.
- The token is obtained from the Sf-Context-Current-User-Token header that Snowflake provides to the container when a user accesses a service with caller’s rights (executeAsCaller: true).
- Use this function to implement token refresh logic in long-running services.