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

# Verify token

> Verify the current authentication token and get user info

<Note>
  This endpoint requires authentication. Include your JWT token in the request.
</Note>

## Response

<ResponseField name="status" type="string">
  Authorization status ("authorized" or "unauthorized")
</ResponseField>

<ResponseField name="user" type="object">
  User information (only if authorized)

  <Expandable title="properties">
    <ResponseField name="firstName" type="string">
      User's first name
    </ResponseField>

    <ResponseField name="lastName" type="string">
      User's last name
    </ResponseField>

    <ResponseField name="username" type="string">
      User's username
    </ResponseField>

    <ResponseField name="email" type="string">
      User's email
    </ResponseField>

    <ResponseField name="role" type="string">
      User role (`user`, `admin`, or `moderator`)
    </ResponseField>

    <ResponseField name="profilePic" type="string">
      Profile picture URL (null if not set)
    </ResponseField>

    <ResponseField name="country" type="string">
      User's country (null if not set)
    </ResponseField>

    <ResponseField name="city" type="string">
      User's city (null if not set)
    </ResponseField>

    <ResponseField name="passportId" type="string">
      User's passport ID (null if not set)
    </ResponseField>

    <ResponseField name="phoneNumber" type="string">
      User's phone number (null if not set)
    </ResponseField>

    <ResponseField name="address" type="string">
      User's address (null if not set)
    </ResponseField>

    <ResponseField name="profileVerification" type="object">
      Profile verification status
    </ResponseField>

    <ResponseField name="verification" type="object">
      User verification details including email and identity verification status
    </ResponseField>

    <ResponseField name="likedPosts" type="array">
      Array of liked post IDs
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      Account creation timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api-verifier-2.onrender.com/verify \
    -H "Authorization: Bearer <your-token>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "status": "authorized",
    "user": {
      "firstName": "John",
      "lastName": "Doe",
      "username": "johndoe",
      "email": "user@example.com",
      "role": "user",
      "profilePic": "https://example.com/profile.jpg",
      "country": "USA",
      "city": "New York",
      "passportId": "AB123456",
      "phoneNumber": "+1234567890",
      "address": "123 Main St",
      "profileVerification": {
        "requiresReview": false,
        "status": "verified",
        "rejectionReason": null
      },
      "verification": {
        "overall": "fully_verified",
        "email": {
          "verified": true,
          "verifiedAt": "2024-12-10T10:00:00.000Z"
        },
        "identity": {
          "verified": true,
          "verifiedAt": "2024-12-11T15:30:00.000Z"
        }
      },
      "likedPosts": [],
      "createdAt": "2024-01-15T10:30:00.000Z"
    }
  }
  ```

  ```json 401 theme={null}
  {
    "status": "unauthorized"
  }
  ```
</ResponseExample>
