如何使用 wallet:accounts:read 请求访问所有用户帐户?

How to request access to all of the user accounts using wallet:accounts:read?

当我的应用程序请求 wallet:accounts:read permission 使用 Coinbase v2 API 时,用户会看到一个包含所有帐户的下拉列表,他只能在三个可能的钱包中选择一个。如果我的应用程序想要与所有三个钱包(例如 BTC、ETC、LTC)一起使用,什么是优雅的解决方案?连接 OAuth 三次,每次都请求用户授予对特定钱包的访问权限,这不是一个干净的解决方法。应用程序如何通过一次请求请求所有帐户的权限?

根据 Coinbase docs,在 Oauth 流程的 GET https://www.coinbase.com/oauth/authorize 部分,您可以选择指定参数 accounts 来配置您的应用程序可以访问哪些帐户。

Change the account access the application will receive. Available values:

select (default) Allow user to pick the wallet associated with the application

new Application will create a new wallet (named after the application)

all Application will get access to all of user’s wallets

For backward compatibility all is used as default for applications created prior to this change

添加此参数允许我访问与用户关联的所有帐户!