"code":“390100”尝试使用 Oauth 从 Postman 连接到 SQL API 时指定的用户名密码不正确

"code": "390100" Incorrect Username Password specified when trying to connect to SQL API from Postman using Oauth

尝试连接到雪花时出现以下错误。

{
    "code": "390100",
    "message": "Incorrect username or password was specified."
}

当我通过 cli 生成令牌并使用它连接到雪花时,同样有效。当我使用 Oauth 时出现此问题。

有人知道这方面的信息吗?

查看下面的官方文档。

https://docs.snowflake.com/en/developer-guide/sql-api/submitting-requests.html#label-sql-api-submit-query-regionless-account

Snowflake-Account header 必须传递,这必须是帐户定位器(当您连接到 snowflake UI 时,您可以在您的用户名下找到)。

例如:

当您连接到 snowflake 时,有两个 URL 可以使用。

无区域 :--> https://organizationname-accountname.snowflakecomputing.com 区域 :-> https://Account_locator.us-east-2.snowflakecomputing.com

当您使用无区域 URL 且身份验证类型为 OAUTH 时,您需要额外传递 header.

"Snowflake-Account: "

在邮递员中,您可以通过键和值的方式传递headers 下的参数,其中键为Snowflake-Account,值为Account Locator。

如果你不使用regionlessURL,上面的header就不需要了。

如果以上内容有帮助,请告诉我。另附上知识库文章供您参考使用 postman 进行设置。

https://community.snowflake.com/s/article/Connect-to-SQL-API-using-Postman