# Auth Types

Auth types define how users sign up and log in on your marketplace.
Each type represents a different authentication flow, such as email + password, mobile + OTP, or direct registration.
The table below helps you choose the flow that matches your onboarding and verification requirements.

| Type | Constant | Flow | Verification |
|------|----------|------|--------------|
| 1 | `AUTH_TYPE_EMAIL_PASSWORD` | Email + password | Email OTP required (`/v1/users/verify`) |
| 2 | `AUTH_TYPE_MOBILE_OTP` | Mobile + OTP | Mobile OTP required (`/v1/users/verify`) |
| 3 | `AUTH_TYPE_MOBILE_PASSWORD` | Mobile + password | Mobile OTP required only during registration (`/v1/users/verify`) |
| 4 | `AUTH_TYPE_EMAIL_PASSWORD_DIRECT` | Email + password | Direct registration (no verify step) |
| 5 | `AUTH_TYPE_MOBILE_PASSWORD_NO_OTP` | Mobile + password | Direct registration (no verify step) |
| 6 | `AUTH_TYPE_DIRECT_REGISTRATION` | Profile-only/direct | Direct registration (no verify step) |
| 7 | `AUTH_TYPE_EMAIL_OTP` | Email + OTP | Email OTP required (`/v1/users/verify`) |

## Type 1: Email & Password (2-Step)

Create a user with email and password. The API sends a 6-digit email OTP and returns `verify_id`. Complete signup by calling **Verify** with `verify_id` and `code`.

## Type 2: Mobile & OTP (2-Step)

Create a user with mobile number. The API sends a 6-digit SMS OTP and returns `verify_id`. Complete signup by calling **Verify** with `verify_id` and `code`.

## Type 3: Mobile & Password (2-Step)

Create a user with mobile number and password. The API sends a 6-digit SMS OTP and returns `verify_id`. Complete signup by calling **Verify** with `verify_id` and `code`.

## Type 4: Email & Password Direct

Create or merge a user using email and password without OTP verification. User creation completes in the register call.

## Type 5: Mobile & Password (No OTP)

Create or merge a user using mobile and password without OTP verification. User creation completes in the register call.

## Type 6: Direct Registration

Directly register user profile data without OTP verification. Intended for trusted/direct onboarding flows.

## Type 7: Email OTP

Email-only OTP onboarding flow. The API sends a 6-digit email OTP and returns `verify_id`. Complete signup by calling **Verify** with `verify_id` and `code`.

## Notes

1. We do not support mobile-based registration for Hosted Web Apps (managed by Tradly). Mobile registration is available for companies using Tradly Headless API.
2. We currently support [Twilio](https://www.twilio.com) and [Karix](https://karix.com) as SMS gateways. If you need a different SMS provider, contact our support team to discuss integration options.
