App

App #


app


How to get the application data #

The app function will retrieve the application name and data from the application record. This function does not require that a user be logged in to the application. Th

A mobile app should check whether the status is ‘migrated’, if it is, the mobile app should inform the user that he/she needs to update their app from the store because the app’s authentication point has been migrated to a new (possibly self-hosted) app. Only by downloading the new app will the user be able to authenticate.

This function will also return the list of locales supported by the application.

URL #

    /api/appuser/app

Method #

    GET

Headers #

    app-token: "<App Token>"

Data Parameter #

    None

Response: #

Success: #

StatusCode: #
200 (OK)
Contents: #
    {
        appId: <uuid>,
        displayAppId: <appname-uniqueId>,
        name:  <application name>,
        userId: <uuid>,
        status: <'active', 'inactive', 'migrated'>
        handleType: <'email', 'phone', 'both'>,
        emailExtension: <true | false>,
        appPublicKey: <raw key>,
        appToken: <jwt token>,
        signup: <'open', 'invite'>,
        anonymousLoginEnabled: <true | false>,
        userNamesEnabled: <true | false>,
        userJWTExpiration: <hours>,
        locales: [
            "EN"
        ],
        createdAt: "2024-09-02T14:07:57.000Z",
        updatedAt: "2024-09-02T14:43:01.000Z"
    }

Error: #

StatusCode: #
    400 (BAD REQUEST)
    500 (INTERNAL SERVER ERROR)
Contents: #
    {
        code: "<internal error code>",
        message: "<readable error description>"
    }

The internal codes are integers:

  • 400 - invalid app token
  • 401 - app no longer exists
  • 402 - app is suspended
  • 403 - missing parameter
  • 500 - internal server error
  • 602 - invalid data