Skip to content

Add a GetSessionToken method to SnowflakeConnection and expose overrides of Client App ID/Version#1

Draft
cvermilion wants to merge 3 commits intomasterfrom
expose-session-token
Draft

Add a GetSessionToken method to SnowflakeConnection and expose overrides of Client App ID/Version#1
cvermilion wants to merge 3 commits intomasterfrom
expose-session-token

Conversation

@cvermilion
Copy link
Copy Markdown

@cvermilion cvermilion commented Jul 11, 2025

The intent is to enable token exchange, where the client code has obtained an OAuth token via a browser flow, and now wants a session token to hit an API like SPCS that won't accept an OAuth token.

Unfortunately it seems like the behavior of the token exchange is different depending on the client, so this fork also allows you to change the client app ID and version. (These are sent in the body of the request to /session/v1/login-request.)

The intent is to enable token exchange, where the client code has
obtained an OAuth token via a browser flow, and now wants a session
token to hit an API like SPCS that won't accept an OAuth token.
pretending to be Python seems to change the behavior of the
`login-request` endpoint...
@cvermilion cvermilion changed the title Add a GetSessionToken method to SnowflakeConnection Add a GetSessionToken method to SnowflakeConnection and expose overrides of Client App ID/Version Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant