Skip to content

Users update user

Onur Akpolat edited this page Oct 27, 2016 · 1 revision

Update user information, when editing their profile for example.

Endpoint

PUT https://api.tapglue.com/0.4/me

Params

Name Type
user_name string
custom_id string
social_ids [string]
password string
first_name string
last_name string
about string
email string
url string
images object
metadata object
private object
is_friend boolean
is_follower boolean
is_followed boolean
friend_count int
follower_count int
followed_count int

Example

curl https://api.tapglue.com/0.4/me \
    -X PUT \
    -u [[app:key]]:SESSION_TOKEN \
    -H "User-Agent: Tapglue Test UA" \
    -H 'Accept: application/json' \
    -H "Content-Type: application/json" \
    -d "{\"first_name\":\"Vincent\",\"last_name\":\"Heather\",\"user_name\":\"Vincent\",\"email\":\"kenyon@mail.com\",\"url\":\"myapp://users/1\",\"social_ids\":{\"facebook\":\"fb12345678\"},\"password\":\"password\",\"metadata\":{\"foo\":\"bar\"},\"custom_id\":\"1\",\"images\":{\"avatar\":{\"url\":\"https://mydomain.com/users/1/avatar.jpg\",\"height\":400,\"width\":400},\"avatar_thumb\":{\"url\":\"https://mydomain.com/users/1/avatar_thumb.jpg\",\"height\":150,\"width\":150}}}"

Response

{
  "id_string": "19136110722551396",
  "id": 19136110722551396,
  "custom_id": "1",
  "social_ids": {
    "facebook": "fb12345678"
  },
  "friend_count": 0,
  "follower_count": 0,
  "followed_count": 0,
  "user_name": "Vincent",
  "first_name": "Vincent",
  "last_name": "Heather",
  "email": "vincent@mail.com",
  "url": "myapp://users/1",
  "last_login": "2016-01-10T18:27:10.828760235Z",
  "session_token": "P2MrdEFqK1s/LStqfGMpZkwxPnI=",
  "metadata": {
    "foo": "bar"
  },
  "images": {
    "avatar": {
      "url": "https://mydomain.com/users/1/avatar.jpg",
      "width": 400,
      "height": 400
    },
    "avatar_thumb": {
      "url": "https://mydomain.com/users/1/avatar_thumb.jpg",
      "width": 150,
      "height": 150
    }
  },
  "created_at": "2016-01-10T18:27:10.968461027Z",
  "updated_at": "2016-01-10T18:27:10.968461027Z",
  "enabled": true
}
Clone this wiki locally