How to request access to all of the user accounts

2019-02-19 00:31发布

When my app requests wallet:accounts:read permission using v2 of Coinbase API, the user is presented with a drop-down list of all accounts where he can choose only one of the three possible wallets. If my app wants to work with all three wallets (e.g. BTC, ETC, LTC), what is an elegant solution? Connecting with OAuth three times, each time requesting the user to grant access to a specific wallet is not a clean workaround. How can the app request permission to all of the accounts with a single request?

1条回答
戒情不戒烟
2楼-- · 2019-02-19 00:53

According to the Coinbase docs, in the GET https://www.coinbase.com/oauth/authorize portion of the Oauth flow, you can optionally specify the parameter accounts to configure which accounts your application has access to.

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

Adding this parameter allowed me to get access to all accounts associated with a user!

查看更多
登录 后发表回答