Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Bucephalus-lgtm/a36e12bab3fe1e84af9152d7397011d1 to your computer and use it in GitHub Desktop.
Save Bucephalus-lgtm/a36e12bab3fe1e84af9152d7397011d1 to your computer and use it in GitHub Desktop.
import requests

headers = {
  'Authorization': 'Bearer <__jwt__>',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'User-Agent': 'demoApp/1.0',
  'X-Snowflake-Authorization-Token-Type': '<__keyPair_JWT__>',
}

response = requests.get(
  'https://<__account_identifier__>.snowflakecomputing.com/api/v2/statements/<__statement_handle__>',
  headers=headers,
)

where,

  • keyPair_JWT is the public-private key pair
  • jwt is the JWT that you generated for authentication
  • demoApp is an example of an identifier for your application
  • account_identifier is your account identifier(An account identifier uniquely identifies a Snowflake account within your organization)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment