On this page

    1. Home
    2. API
    3. API Reference
    4. Login

    Login

    This endpoint initiates the authentication process for a user. It supports multiple authentication methods including email, phone number, and third-party JWTs (Apple or Google).


    POST /auth/login

    Start a login for a user authority. The server will respond with the allowed authentication methods for the provided user.

    Request

    POST /auth/login

    Headers:

    {
      "Host": "api.bringyour.com",
      "Content-Type": "application/json"
    }

    Body:

    {
      "user_auth": "user@example.com",
      "auth_jwt_type": "google",
      "auth_jwt": "eyJhbGciOi..."
    }

    Fields

    FieldTypeDescription
    user_authstringOptional. Email address or phone number.
    auth_jwtstringOptional. The external authentication JWT (e.g., from Apple or Google).
    auth_jwt_typestringOptional. Type of the JWT. One of: google, apple, un.
    wallet_authobjectOptional. Wallet-based authentication parameters.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    A successful response indicates the server recognized the user and provides instructions on how to proceed with the login flow.

    {
      "user_name": "John Doe",
      "user_auth": "user@example.com",
      "auth_allowed": ["password", "verify"],
      "network": {
        "by_jwt": "eyJhbGciOi..."
      },
      "error": null
    }

    Fields

    FieldTypeDescription
    user_namestringThe display name of the user.
    user_authstringThe primary identifier used for authentication.
    auth_allowedarrayMethods the user can use to complete login (e.g., verify, password).
    networkobjectContains the network JWT if session initiation is complete.
    network.by_jwtstringThe JWT used for subsequent authorized network requests.
    errorobjectDetails on suggested actions if login cannot proceed directly.

    Example

    HTTP Request

    POST /auth/login HTTP/1.1
    Host: api.bringyour.com
    Content-Type: application/json
     
    {
      "user_auth": "support@ur.io"
    }

    Successful HTTP Response

    {
      "user_name": "URnetwork Admin",
      "user_auth": "support@ur.io",
      "auth_allowed": ["password"]
    }


    Powered by Sudoc v2.5.0
    Hide table of contents