> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bilalsadasub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Access Token

> Exchange your account **username and password** (sent as HTTP Basic Auth) for your **API key** (`AccessToken`). Do this once, then send `Authorization: Token <AccessToken>` on every other endpoint. Keep the key secret — anyone with it can spend your wallet.

Exchange your account **username and password** (HTTP Basic Auth) for your **API key**. Call this once, then authenticate every other request with `Authorization: Token <AccessToken>`.


## OpenAPI

````yaml POST /api/user
openapi: 3.1.0
info:
  title: Bilalsadasub API
  version: 1.0.0
  description: >-
    Bilalsadasub developer API — buy data, airtime, cable, electricity, bulk
    SMS, exam pins, airtime-to-cash and flights, funded from your wallet.
servers:
  - url: https://bilalsadasub.com
    description: Production (live — charges your wallet)
security:
  - TokenAuth: []
tags:
  - name: Purchases
  - name: Verification
  - name: Betting
  - name: eSIM
  - name: Flights
  - name: Wallet
  - name: Catalogs
  - name: Account
paths:
  /api/user:
    post:
      tags:
        - Authentication
      summary: Generate Access Token
      description: >-
        Exchange your account **username and password** (sent as HTTP Basic
        Auth) for your **API key** (`AccessToken`). Do this once, then send
        `Authorization: Token <AccessToken>` on every other endpoint. Keep the
        key secret — anyone with it can spend your wallet.
      responses:
        '200':
          description: Authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  AccessToken:
                    type: string
                    description: 'Your API key — use as `Authorization: Token <AccessToken>`'
                  balance:
                    type: string
                    description: Current wallet balance (formatted)
                  username:
                    type: string
              example:
                status: success
                AccessToken: a1b2c3d4e5f6g7h8
                balance: 110,225.50
                username: johndoe
        '401':
          description: Invalid username or password
      security:
        - BasicAuth: []
components:
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your API key as `Token <your_api_key>`.


        Use your **live key** for real transactions, or your **sandbox key**
        (`sk_test_…`) to test — sandbox calls return a realistic simulated
        result and never touch your wallet. Add `"sandbox_status": "fail"` to
        any sandbox request to simulate a failure.
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        HTTP Basic Auth: base64 of `username:password`. Used only to generate
        your API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.