How to register your own Snowflake OAuth app

Register an OAuth integration with Snowflake and connect it to Tenklo

This guide shows you how to configure an OAuth integration in Snowflake to obtain credentials (client ID & secret). These are required to let your users grant your app access to their Snowflake account.

Create an OAuth integration in Snowflake

Run the following SQL in your Snowflake worksheet as an ACCOUNTADMIN (or a role with the CREATE INTEGRATION privilege):

CREATE SECURITY INTEGRATION <integration_name>
    TYPE = OAUTH
    ENABLED = TRUE
    OAUTH_CLIENT = CUSTOM
    OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
    OAUTH_REDIRECT_URI = 'https://api.tenklo.dev/oauth/callback'
    OAUTH_ISSUE_REFRESH_TOKENS = TRUE
    OAUTH_REFRESH_TOKEN_VALIDITY = 86400;

Replace <integration_name> with a name for your integration.

Get your client ID and secret

Run these queries to retrieve your credentials:

SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('<integration_name>');

Note your OAuth client ID and OAuth client secret.

Configure scopes

Assign the correct role/scope to the OAuth integration so the token has the right permissions. See Snowflake OAuth scopes for details.

Next

Follow the Quickstart.

For more on the Snowflake OAuth flow, see the Snowflake OAuth API reference.