The user object

name type description
email string user email
phone string user phone
name string user name
accountProviders object[] list of account provider object

The accountProvider object

name type description
remoteId string identifier of the external user
name string provider name
displayName string display name of provider
updatedAt number updated timestamp

Get user

Endpoints

GET /users/me

Request Example

curl -H "Authorization: Bearer <access_token>" \
     -H "accept-version: 2.0.0" \
     "https://api2.enertalk.com/users/me"

Response

Retrieved user object, or error on failure.

Response Example

{
  "email": "home@encoredtech.com",
  "phone": "8201012345678",
  "name": "John",
  "accountProviders": [
    {
      "remoteId": "abcdef",
      "name": "SAMSUNG",
      "displayName": "Samsung",
      "updatedAt": 1479190407000,
    },
  ],
}

Update user

Endpoints

PATCH /users/me

Parameters

name type description
email string user email
phone string user phone
name string user name

Request Example

curl -X PATCH
     -H "Authorization: Bearer <access_token>" \
     -H "accept-version: 2.0.0" \
     -H "Content-Type: application/json" \
     -d '{ "name": "Terry"}'
     "https://api2.enertalk.com/users/me"

Response

Updated user object, or error on failure.

Response Example

{
  "email": "home@encoredtech.com",
  "phone": "8201012345678",
  "name": "Terry",
  "accountProviders": [],
}