---
title: "end user' login by google, facebook, apple, crypto' signature"
method: POST
path: "/v1/users/login"
tags: ["Auth"]
---

# end user' login by google, facebook, apple, crypto' signature

`POST /v1/users/login`

## Request

- Base URL: `https://api.chat.ethora.com`
- URL: `https://api.chat.ethora.com/v1/users/login`
- Auth: none required

**Auth**: None (appId required; legacy App JWT accepted)

End user login endpoint, should be used with Authorization header set to App JWT.
App JWT example: {JWT token}


Provide `appId` in the request body to resolve app context. Legacy `Authorization` app token is also accepted for backward compatibility.

## Request body

- union
  - UserGoogleAppleFacebookLogin
    - `loginType` 'google' | 'facebook' | 'apple', required
    - `authToken` string, required
    - `signupPlan` 'business' | 'free'
    - `utm` string
  - SignatureLogin
    - `walletAddress` string, required
    - `signature` string, required
    - `msg` string, required

## Response `200`

```
{
  success: boolean,
  user: {
    defaultWallet: {
      walletAddress: string
    },
    _id: string,
    firstName: string,
    lastName: string,
    email: string,
    username: string,
    tags: string[],
    profileImage: string,
    emails: [
      {
        loginType: string,
        email: string,
        verified: boolean,
        _id: string
      }
    ],
    appId: string,
    xmppPassword: string,
    roles: string[],
    isProfileOpen: boolean,
    isAssetsOpen: boolean,
    isAgreeWithTerms: boolean,
    homeScreen: string,
    registrationChannelType: string,
    createdAt: string,
    updatedAt: string
  },
  token: string,
  refreshToken: string
}
```

- LoginSuccessResponse
  - `success` boolean, required
  - `token` string, required
  - `refreshToken` string, required
  - `wsToken` string
  - `user` UserPublic, required
    - `_id` string
    - `uuid` string, nullable
    - `xmppUsername` string
    - `email` string, nullable
    - `firstName` string, nullable
    - `lastName` string, nullable
    - `username` string, nullable
    - `profileImage` string, nullable
    - `profilePicture` string, nullable
    - `description` string, nullable
    - `tags` string[], nullable
  - `isAllowedNewAppCreate` boolean, nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: user did not validate his email in registration step
- `422`: ``` { errors: [{msg: string}] } ```
- `500`: Internal Server Error

---

[API](https://skmtc.dev/ethora/apis/platform-api.md) · [All operations](https://skmtc.dev/ethora/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ethora/apis/platform-api/revisions/01b6e64378ee?raw)
