Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

coinbase-api

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?

like image 973
Holmes.Sherlock Avatar asked Dec 17 '17 17:12

Holmes.Sherlock


1 Answers

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!

like image 103
Ruben Martinez Jr. Avatar answered Nov 08 '22 18:11

Ruben Martinez Jr.