---
title: "Logging in with WeChat"
method: POST
path: "/v2/user/wechat_app_login"
tags: ["user"]
---

# Logging in with WeChat

`POST /v2/user/wechat_app_login`

Client post code to login wechat app

## Request body

- BluenteInternalUserModelAuthLoginReq
  - `app_id` integer, required — 登录AppID Bluente 模式设置10000
  - `code` string, required — 如果是微信小程序，这个是code，
  - `platform` string — android 还是 ios
  - `referee_id` integer — 推荐人ID
  - `scene` integer — 微信登录用户的场景值
  - `src` string — 登录来源

## Response `200`

success, the data field just login response

- object
  - `code` integer — 0=success，only parse data when code=0
  - `data` object — real data
    - `country_code` string
    - `isPremium` boolean
    - `is_new_user` boolean
    - `jwtToken` string
    - `learn_language` string
    - `organization` BluenteInternalCourseV2ModelOrganization
      - `contact_email` string
      - `contact_person` string
      - `contact_phone` string
      - `created_at` BluenteInternalCourseV2ModelCustomTime
        - `time.Time` string
      - `extra_config` BluenteInternalCourseV2ModelExtraConfig
      - `id` integer
      - `invoice_enable` integer — allow invoice generation
      - `name` string — name of organization
      - `profile_headers` BluenteInternalCourseV2ModelProfileHeader[] — profile headers are key value pairs that links the company various company information that is translated to other languages
        - `description` object — language as key, description for each header in different language
        - `header` string — The header of of the profile
      - `type` string — type of organization
      - `updated_at` BluenteInternalCourseV2ModelCustomTime
        - `time.Time` string
      - `user_role` string
      - `uuid` string — uuid of the organization
    - `rights` string
    - `speak_language` string
    - `user` BluenteInternalUserModelLoginUser
      - `activated` integer
      - `audit` BluenteInternalCourseV2OldmodelAudit
        - `createdAt` string
        - `createdBy` string
        - `updatedAt` string
        - `updatedBy` string
      - `email` string
      - `fullName` string
      - `lastCourse` string
      - `lastCourses` string[]
      - `lastLogin` string
      - `lastModule` string
      - `lastModules` string[]
      - `role` string
      - `status` string
      - `translationExpireAt` string
      - `translationPages` integer
      - `type` string
      - `uuid` string
  - `message` string — tip message

---

[API](https://skmtc.net/bluente/apis/bluente-api.md) · [All operations](https://skmtc.net/bluente/apis/bluente-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bluente/bluente-api/revisions/5c90e58bf672/schema)
