Skip to content

User Auth

  • Endpoint Path: /api/v2/user/auth
  • Method: POST
  • Request: application/json

Headers Optional Parameter

Parameter NamePublic Mode (Required)Private Mode (Required)
X-Fresns-Aidrequiredrequired
X-Fresns-Aid-Tokenrequiredrequired
X-Fresns-Uidoptionaloptional
X-Fresns-Uid-Tokenoptionaloptional

Body Params

Parameter NameTypeRequiredDescription
uidOrUsernameNumber / StringrequiredUser uid or username
passwordStringoptionalPassword (Base64 encoded)
deviceTokenStringoptionaliOS or Android device Token

Return

json
{
    "code": 0,
    "message": "ok",
    "data": {
        "sessionToken": {
            "uid": "String / User ID",
            "token": "String / User login token",
            "expiredHours": "Number / Validity period in hours, null for permanent validity",
            "expiredDays": "Number / Validity period in days, null for permanent validity",
            "expiredDateTime": "String / token validity time, null for permanent validity, format: Y-m-d H:i:s"
        },
        "detail": {
            // Common Data Structure -> User Info
        }
    }
}

Released under the Apache-2.0 License