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

我只是一个虾纸丫 提交于 2019-11-30 17:55:14

问题


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:


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!



来源:https://stackoverflow.com/questions/47857809/how-to-request-access-to-all-of-the-user-accounts-using-walletaccountsread

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!