Skip to main content

Wallet API: Users/User [Deprecated]

Table of Endpoints

NameMethodEndpointScope
Show UserGET/v2/users/:user_idN/A
Show Current UserGET/v2/user- N/A for public data
- wallet:user:read
- wallet:user:email
Show Authorization InformationGET/v2/user/authN/A
Update Current UserPUT/v2/userwallet:user:update
info
  • /user refers to the current user making the request.
  • /users allows you to pass an ID of a User from whom you want data.

Overview

The User resource represents generic user information. By default, only public information is shared without any scopes. More detailed information or email can be requested with additional scopes.

ParameterDescription
id stringResource ID
name string, optionalUser's public name
username string, optionalPayment method's native currency
profile_location string, optionalLocation for user's public profile
profile_bio string, optionalBio for user's public profile
profile_url string, optionalPublic profile location if user has one
avatar_url stringUser's avatar url
resource string, constant user
resource_path string

User's Public Info (default)

{
"id": "9da7a204-544e-5fd1-9a12-61176c5d4cd8",
"name": "User One",
"username": "user1",
"profile_location": null,
"profile_bio": null,
"profile_url": "https://coinbase.com/user1",
"avatar_url": "https://images.coinbase.com/avatar?h=vR%2FY8igBoPwuwGren5JMwvDNGpURAY%2F0nRIOgH%2FY2Qh%2BQ6nomR3qusA%2Bh6o2%0Af9rH&s=128",
"resource": "user",
"resource_path": "/v2/user"
}

Detailed Info of Authenticated User (wallet:user:read)

{
...
"time_zone": "Pacific Time (US & Canada)",
"native_currency": "USD",
"bitcoin_unit": "bits",
"country": {
"code": "US",
"name": "United States"
},
"created_at": "2015-01-31T20:49:02Z"
}

Authenticated User with Email (wallet:user:email)

{
...
"email": "user1@example.com"
}

Show User

Get any user's public information with their ID.

HTTP Request

GET https://api.coinbase.com/v2/users/:user_id

Scopes

  • No permission required

Examples

Request

curl https://api.coinbase.com/v2/users/9da7a204-544e-5fd1-9a12-61176c5d4cd8 /
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'

Response (200)

{
"data": {
"id": "9da7a204-544e-5fd1-9a12-61176c5d4cd8",
"name": "User One",
"username": "user1",
"profile_location": null,
"profile_bio": null,
"profile_url": "https://coinbase.com/user1",
"avatar_url": "https://images.coinbase.com/avatar?h=vR%2FY8igBoPwuwGren5JMwvDNGpURAY%2F0nRIOgH%2FY2Qh%2BQ6nomR3qusA%2Bh6o2%0Af9rH&s=128",
"resource": "user",
"resource_path": "/v2/user/9da7a204-544e-5fd1-9a12-61176c5d4cd8"
}
}

Show Current User

Get current user's public information. To get user's email or private information, use permissions wallet:user:email and wallet:user:read. If current request has a wallet:transactions:send scope, then the response will contain a boolean sends_disabled field that indicates if the user's send functionality has been disabled.

HTTP Request

GET https://api.coinbase.com/v2/user

Scopes

  • No scope required for public data
  • wallet:user:read
  • wallet:user:email

Examples

Request

curl https://api.coinbase.com/v2/user /
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'

Response

{
"data": {
"id": "9da7a204-544e-5fd1-9a12-61176c5d4cd8",
"name": "User One",
"username": "user1",
"profile_location": null,
"profile_bio": null,
"profile_url": "https://coinbase.com/user1",
"avatar_url": "https://images.coinbase.com/avatar?h=vR%2FY8igBoPwuwGren5JMwvDNGpURAY%2F0nRIOgH%2FY2Qh%2BQ6nomR3qusA%2Bh6o2%0Af9rH&s=128",
"resource": "user",
"resource_path": "/v2/user"
}
}

Show Authorization Information

Get current user's authorization information including granted scopes and send limits when using OAuth2 authentication.

HTTP Request

GET https://api.coinbase.com/v2/user/auth

Scopes

  • No permission required

Examples

Request

curl https://api.coinbase.com/v2/user/auth /
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c'

Response

{
"data": {
"method": "oauth",
"scopes": [
"wallet:user:read",
"wallet:user:email"
],
"oauth_meta": {}
}
}

Update Current User

Modify current user and their preferences.

HTTP Request

PUT https://api.coinbase.com/v2/user

Scopes

  • wallet:user:update

Arguments

ParameterTypeRequiredDescription
namestringOptionalUser's public name
time_zonestringOptionalTime zone
native_currencystringOptionalLocal currency used to display amounts converted from BTC

Examples

Request

curl https://api.coinbase.com/v2/user /
-X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer abd90df5f27a7b170cd775abf89d632b350b7c1c9d53e08b340cd9832ce52c2c' \
-d '{"name": "James Smith"}'

Response (200)

{
"data": {
"id": "9da7a204-544e-5fd1-9a12-61176c5d4cd8",
"name": "James Smith",
"username": "user1",
"profile_location": null,
"profile_bio": null,
"profile_url": "https://coinbase.com/user1",
"avatar_url": "https://images.coinbase.com/avatar?h=vR%2FY8igBoPwuwGren5JMwvDNGpURAY%2F0nRIOgH%2FY2Qh%2BQ6nomR3qusA%2Bh6o2%0Af9rH&s=128",
"resource": "user",
"resource_path": "/v2/user"
}
}

Was this helpful?