GET /user/info

Get an authenticated Coil user's resources

GET https://api.coil.com/user/info

Before you can get a Coil user's resources, they must grant your app permission to access it.

Query headers

Key

Value

Content-Type

application/x-www-form-urlencoded

Authorization Bearer

Bearer access_token, where access_token is the JWT-format access token granted to your app through /oauth/token.

No encoded information is required in the body.

Example request

curl -X GET \
'https://api.coil.com/user/info' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Bearer eyJhbGciOi...JSUzI1NfsQ' \
-d ''

Response parameters

The response is a JSON object containing Coil user resources (profile information, etc.).

Parameter

Type

Description

email

string

The user's email address.

fullName

string

The user's full name.

shortName

string

The user's Coil handle.

paymentPointer

string

The user's payment pointer for Interledger Protocol (ILP) payments.

currencyPreferences

object

The currency preference for streaming payments. If null, the default currency is USD with a scale of 9.

sub

string

The user's unique and permanent ID. The ID will never change.

profilePicture

string

The URI for the user's profile picture.

currencyPreferences object

Parameter

Type

Description

code

string

The currency asset code. For example, USD , EUR , or XRP.

scale

number

The number of places past the decimal for the amount. For example, if you have USD with an asset scale of 2, then the minimum divisible unit is cents.

Example response

{
"email": "alice@coil.com",
"fullName": "Alice",
"shortName": "alice",
"paymentPointer": "$wallet.example.com/alice",
"currencyPreferences": {
"code": "USD",
"scale": 9
},
"sub": "22028a7c-b720-7a3e-4387-6c9845f6201b",
"profilePicture": "https://example.com/example-image.png"
}

Next: Generate a bilateral transfer protocol (BTP) token for the Coil user.