Skip to content

Users create user

Onur Akpolat edited this page Oct 27, 2016 · 2 revisions

Create users in your app, when they are seen for the first time.

Endpoint

POST https://api.tapglue.com/0.4/users

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/users \
    -u [[app:key]]: \
    -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\":\"[email protected]\",\"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": "[email protected]",
  "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