Add Wallet Users
Overview
Wallet admins can send wallet-user invitations to people in their enterprise who have a BitGo account. When you share a wallet with users in your enterprise, you can designate them with one of the following roles:
- Admin - Able to initiate any wallet transactions, including adding, approving, and removing wallet users.
- Spender - Able to initiate spend transactions.
- Trader - Able to initiate trades for a Go Account.
- Viewer - Able to view wallet balances, transactions, and wallet metadata (such as other wallet users).
Prerequisites
Create Wallet Share
Endpoint: Create a wallet share
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
export COIN="<ASSET_ID>" export WALLET_ID="<YOUR_WALLET_ID>" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" export MESSAGE="<MESSAGE_TO_THE_INVITEE>" export USER="<INVITEE_USER_ID>" curl -X POST \ https://app.bitgo-test.com/api/v2/$COIN/wallet/$WALLET_ID/share \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d '{ "permissions": "spend,view", "message": "'"$MESSAGE"'", "user": "'"$USER"'", "keychain": { # Enables the wallet spender to sign with their passphrase "pub": "string", "encryptedPrv": "string", "fromPubKey": "string", "toPubKey": "string", "path": "m/1234/1/1" } }'
Step Result
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
{ "id": "string", "coin": "string", "wallet": "string", "walletLabel": "My Wallet", "fromUser": "string", "toUser": "string", "permissions": "spend,view", "message": "string", "state": "active", "enterprise": "string", "pendingApprovalId": "string", "keychain": { "pub": "string", "encryptedPrv": "string", "fromPubKey": "string", "toPubKey": "string", "path": "m/1234/1/1" } }