Api::V1::UsersController API

Users

Login

POST /api/v1/login

Parameters

Name Description
phone Phone
sms_code SMS code

Request

Headers

Content-Type: application/json
Host: example.org
Cookie: 

Route

POST /api/v1/login

Body

{"format":"json","user":{"phone":"+33600000178","sms_code":"123456"}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE
Access-Control-Allow-Headers: Origin,Accept,Content-Type,X-Requested-With,X-CSRF-Token,X-API-KEY
Content-Type: application/json; charset=utf-8
ETag: W/"a1c0b2d075c76663f5e160e4c140ab3f"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: f842f776-2701-4449-84d4-59a9da2959be
X-Runtime: 0.030185
Content-Length: 1060

Status

200 OK

Body

{
  "user": {
    "id": 180,
    "display_name": "John D.",
    "first_name": "John",
    "last_name": "Doe",
    "roles": [

    ],
    "about": null,
    "avatar_url": null,
    "user_type": "pro",
    "partner": null,
    "engaged": false,
    "unread_count": 0,
    "permissions": {
      "outing": {
        "creation": false
      }
    },
    "interests": [

    ],
    "memberships": [

    ],
    "conversation": {
      "uuid": "1_list_180"
    },
    "anonymous": false,
    "uuid": "180",
    "feature_flags": {
      "organization_admin": false
    },
    "token": "foobar178",
    "email": "user178@mail.com",
    "has_password": false,
    "firebase_properties": {
      "ActionZoneDep": "not_set",
      "ActionZoneCP": "not_set",
      "Goal": "no_set",
      "Interests": "none"
    },
    "goal": null,
    "phone": "+33600000178",
    "travel_distance": 10,
    "birthday": null,
    "stats": {
      "tour_count": 0,
      "encounter_count": 0,
      "entourage_count": 0,
      "actions_count": 0,
      "ask_for_help_creation_count": 0,
      "contribution_creation_count": 0,
      "events_count": 0,
      "good_waves_participation": false
    },
    "organization": {
      "name": "Association 83",
      "description": "Association description",
      "phone": "+33600000083",
      "address": "83 avenue des Champs Elysées 75008 Paris France",
      "logo_url": null
    },
    "address": null,
    "address_2": null
  },
  "first_sign_in": true
}