On this page

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

    Login with Password

    This endpoint allows users to complete their authentication by providing their password. It is typically the second step in the login flow after /auth/login identifies the user and determines that password authentication is required.


    POST /auth/login-with-password

    Login using a username (email/phone) and password combination.

    Request

    POST /auth/login-with-password

    Headers:

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

    Body:

    {
      "user_auth": "user@example.com",
      "password": "your-password-here"
    }
    FieldTypeDescription
    user_authstringRequired. The email address or phone number of the account.
    passwordstringRequired. The user's account password.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    A successful response returns the network authentication token or indicates if multi-factor verification is required.

    {
      "verification_required": {
        "user_auth": "string"
      },
      "network": {
        "by_jwt": "eyJhbGciOi...",
        "name": "string"
      },
      "error": {
        "message": "string"
      }
    }

    Fields

    FieldTypeDescription
    verification_requiredobjectPresent if the account requires a final OTP verification step.
    networkobjectContains the network access token if login is complete.
    network.by_jwtstringThe primary JWT for interacting with the URnetwork API.
    network.namestringThe display name of the authenticated network.
    errorobjectDetails on why the login attempt failed (e.g., invalid credentials).

    Example

    HTTP Request

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

    Successful HTTP Response

    {
      "network": {
        "by_jwt": "eyJhbGciOiJIUzI1NiI...",
        "name": "URnetwork Admin"
      },
      "error": null
    }


    Powered by Sudoc v2.5.0
    Hide table of contents