Layer
API reference for Layer endpoints
Endpoints | |
---|---|
/user_account/session/get | Returns user permissioned account data |
Endpoints
/user_account/session/get
Retrieve User Account
Returns user permissioned account data including identity and Item access tokens.
user_account/session/getRequest fields
client_id
string
Your Plaid API
client_id
. The client_id
is required and may be provided either in the PLAID-CLIENT-ID
header or as part of a request body.secret
string
Your Plaid API
secret
. The secret
is required and may be provided either in the PLAID-SECRET
header or as part of a request body.public_token
requiredstring
The public token generated by the end user Layer session.
1const request: UserAccountSessionGetRequest = {2 public_token: 'profile-sandbox-b0e2c4ee-a763-4df5-bfe9-46a46bce992d',3};4try {5 const response = await client.userAccountSessionGet(request);6} catch (error) {7 // handle error8}
user_account/session/get
Response fields and example
identity
nullableobject
The identity data permissioned by the end user during the authorization flow.
address
nullableobject
The user's address.
city
nullablestring
The full city name
region
nullablestring
The region or state.
Example:
"NC"
street
nullablestring
The full street address
Example:
"564 Main Street, APT 15"
street2
nullablestring
The second line street address
postal_code
nullablestring
The postal code. In API versions 2018-05-22 and earlier, this field is called
zip
.country
nullablestring
The ISO 3166-1 alpha-2 country code
phone_number
string
The user's phone number in E.164 format
email
nullablestring
The user's email address.
Note: email is currently not returned for users, and is an upcoming addition that will be live in early 2025.
Note: email is currently not returned for users, and is an upcoming addition that will be live in early 2025.
date_of_birth
nullablestring
The user's date of birth.
ssn
nullablestring
The user's social security number.
ssn_last_4
nullablestring
The last 4 digits of the user's social security number.
items
[object]
item_id
string
The Plaid Item ID. The
item_id
is always unique; linking the same account at the same institution twice will result in two Items with different item_id
values. Like all Plaid identifiers, the item_id
is case-sensitive.access_token
string
The access token associated with the Item data is being requested for.
request_id
string
A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
1{2 "identity": {3 "name": {4 "first_name": "Leslie",5 "last_name": "Knope"6 },7 "address": {8 "street": "123 Main St.",9 "street2": "",10 "city": "Pawnee",11 "region": "IN",12 "postal_code": "41006",13 "country": "US"14 },15 "email": "leslie@knope.com",16 "phone_number": "+14157452130",17 "date_of_birth": "1975-01-18",18 "ssn": "987654321",19 "ssn_last_4": "4321"20 },21 "items": [22 {23 "item_id": "Ed6bjNrDLJfGvZWwnkQlfxwoNz54B5C97ejBr",24 "access_token": "access-sandbox-435beced-94e8-4df3-a181-1dde1cfa19f0"25 }26 ],27 "request_id": "m8MDnv9okwxFNBV"28}