Получить пользователя по емайл или создать нового.

URL ресурса

https://Your project.userecho.com/api/v2/users/get_or_create.json


Параметр Значение Обязательный? По умолчанию Опции Описание
email String yes User's email. This is the only parameter we check to find a user (and email_verified in some cases). If user does not found we will use parameters bellow to create a new one.
name String no first part of email User's display name.
language String no project default language en, en-gb, ru, es, fr, de, nl, is, et, kk, pt-br, uk, cs, da, fi, hu, it, ja, ko, sv, sk, tr, zh-hans, ca, pl, lv, lt, nb, el, he, ar, bg, ro, fa User's default language. Options are limited by your project selected languages.
email_verified Boolean no true Status of user's email. if "false" we will check users with unverified emails only.
custom_fields no Example: "custom_fields":{"cf_1":"test", "cf_2":5} Save custom fields value
send_new_user_invitation Boolean no false Send "true" if you want new user receives an invitation email.

Пример запроса #1

  "name":"Test user"

Пример ответа

    "status": "success", 
    "data": {
        "rating": 0.0, 
        "is_created": true, 
        "name": "Test user", 
        "name_and_title": "Test user", 
        "title": "", 
        "is_authenticated": true, 
        "avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?default=https%3A%2F%2Fcdn.userecho.com%2Fcharacters%2F84.png%3F1&s=48", 
        "slug": "test-user", 
        "language": "en", 
        "is_staff": false, 
        "last_activity": "2016-01-06T19:53:55.688Z", 
        "email": "test@test.com", 
        "id": 3, 
        "date_joined": "2016-01-06T19:53:55.664Z"