Skip to content

Authentication

The Fangate API uses token-based authentication via Laravel Sanctum. Most endpoints require a valid Bearer token in the request header.

Overview

  • Login to receive an access token
  • Include the token in all authenticated requests
  • Header format: Authorization: Bearer {token}
  • Tokens don't expire — revoke via logout when needed

Obtaining a Token

Register

Create a new creator account and receive a token immediately.

bash
curl -X POST https://fangate.info/api/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "creator@example.com",
    "password": "SecurePass123",
    "first_name": "John",
    "last_name": "Doe",
    "birth_date": "2000-01-30",
    "currency_id": 1
  }'

Response:

json
{
  "success": true,
  "errors_message": null,
  "data": {
    "user": { ... },
    "token": "1|9NasfkKFS32gndslNDKd0323213ldm"
  }
}

Login

Authenticate with existing credentials.

bash
curl -X POST https://fangate.info/api/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "creator@example.com",
    "password": "SecurePass123"
  }'

Response:

json
{
  "success": true,
  "errors_message": null,
  "data": {
    "user": { ... },
    "token": "1|9NasfkKFS32gndslNDKd0323213ldm"
  }
}

Using the Token

Include the token in the Authorization header for all protected endpoints:

bash
curl -H "Authorization: Bearer 1|9NasfkKFS32gndslNDKd0323213ldm" \
  https://fangate.info/api/user

Logout

Invalidate the current token:

bash
curl -X POST https://fangate.info/api/logout \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"

Optional: Pass fcm_token as query parameter to also remove the FCM token from the user's devices.

Registration Fields

FieldRequiredDescription
emailYesCreator email address
passwordYesMinimum 8 characters
first_nameYesFirst name
last_nameYesLast name
birth_dateYesFormat YYYY-MM-DD, must be 18+
currency_idYesCurrency ID (USD=1, EUR, GBP)
ibanNoBank IBAN for payouts
bic_swiftNoBank BIC/SWIFT
addressNoAddress
invite_codeNo5-digit referral code
is_adult_contentNoDefault AVS setting
is_verif_ageNoDefault Yoti requirement

Email Verification Flow

Before full registration, creators must verify their email:

  1. Send verification email: POST /api/user/email/verify with email
  2. User clicks "Yes, this is my email" in the email
  3. User is redirected to complete registration (currency, name, birth date, etc.)

Unauthenticated Endpoints

The following endpoints do not require authentication:

  • POST /api/register
  • POST /api/login
  • POST /api/user/email/verify
  • POST /api/user/password/reset
  • POST /api/report
  • GET /api/app-data
  • POST /api/yoti/webhook
  • POST /api/yoti/session/create

Fangate API Documentation