On this page

    1. Home
    2. API
    3. API Reference
    4. Auth Verify

    Auth Verify

    The verify endpoint is used to finalize an authentication flow by submitting a verification code sent to the user's email or phone number.


    POST /auth/verify

    Submit a verification code to authenticate a user authority.

    Request

    POST /auth/verify

    Headers:

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

    Body:

    {
      "user_auth": "string",
      "verify_code": "string"
    }
    FieldTypeDescription
    user_authstringRequired. The email or phone number being verified.
    verify_codestringRequired. The verification code received by the user.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    A successful verification returns the network authentication details.

    {
      "network": {
        "by_jwt": "string"
      },
      "error": {
        "message": "string"
      }
    }
    FieldTypeDescription
    network.by_jwtstringThe JWT used for authorized network requests.
    error.messagestringA descriptive message if verification failed.

    Example

    HTTP Request

    POST /auth/verify HTTP/1.1
    Host: api.bringyour.com
    Content-Type: application/json
     
    {
      "user_auth": "user@example.com",
      "verify_code": "12345678"
    }

    Successful HTTP Response

    {
      "network": {
        "by_jwt": "eyJhbGciOiJIUzI1NiI..."
      },
      "error": null
    }


    Powered by Sudoc v2.5.0
    Hide table of contents