# Authentication

Authentication and profile endpoints

## Get current user

> Returns the currently authenticated user with basic information.

```json
{"openapi":"3.0.0","info":{"title":"PlainProxies API v2","version":"2.0.0"},"tags":[{"name":"Authentication","description":"Authentication and profile endpoints"}],"servers":[{"url":"https://dashboard.plainproxies.com/api/v2","description":"Production API Server"},{"url":"https://plainproxies-sandbox.com/api/v2","description":"Sandbox API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"API Key authentication. Get your key from the Dashboard Settings page. Include in all requests as: `X-API-KEY: PlainProxies_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`","name":"X-API-KEY","in":"header"}},"schemas":{"User":{"properties":{"uuid":{"type":"string","format":"uuid"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"is_reseller":{"type":"boolean"},"verification":{"properties":{"status":{"type":"string","enum":["pending","verified","denied","suspected","expired","canceled","unverified"]},"is_verified":{"type":"boolean"}},"type":"object"},"created_at":{"type":"string","format":"date-time"},"balance":{"properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string"}},"type":"object","nullable":true},"reseller":{"properties":{"id":{"type":"integer"},"discount_percentage":{"type":"number","format":"float"},"is_active":{"type":"boolean"}},"type":"object","nullable":true},"stats":{"properties":{"sub_users_count":{"type":"integer"},"active_subscriptions_count":{"type":"integer"},"total_invoices_count":{"type":"integer"}},"type":"object","nullable":true}},"type":"object"}}},"paths":{"/auth/me":{"get":{"tags":["Authentication"],"summary":"Get current user","description":"Returns the currently authenticated user with basic information.","operationId":"bf5529cda9a17bb715ae9da1560a4368","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/User"}},"type":"object"}}}},"401":{"description":"Unauthorized"}}}}}}
```

## Get API key information

> Returns details about the current API key including creation date and last usage.

```json
{"openapi":"3.0.0","info":{"title":"PlainProxies API v2","version":"2.0.0"},"tags":[{"name":"Authentication","description":"Authentication and profile endpoints"}],"servers":[{"url":"https://dashboard.plainproxies.com/api/v2","description":"Production API Server"},{"url":"https://plainproxies-sandbox.com/api/v2","description":"Sandbox API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"API Key authentication. Get your key from the Dashboard Settings page. Include in all requests as: `X-API-KEY: PlainProxies_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`","name":"X-API-KEY","in":"header"}}},"paths":{"/auth/api-key":{"get":{"tags":["Authentication"],"summary":"Get API key information","description":"Returns details about the current API key including creation date and last usage.","operationId":"12058e00b513a00e22f6532ee6c20115","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"properties":{"api_key":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}}}}}}
```

## Get user profile

> Returns the user profile with optional related data (balance, reseller, stats).

```json
{"openapi":"3.0.0","info":{"title":"PlainProxies API v2","version":"2.0.0"},"tags":[{"name":"Authentication","description":"Authentication and profile endpoints"}],"servers":[{"url":"https://dashboard.plainproxies.com/api/v2","description":"Production API Server"},{"url":"https://plainproxies-sandbox.com/api/v2","description":"Sandbox API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"API Key authentication. Get your key from the Dashboard Settings page. Include in all requests as: `X-API-KEY: PlainProxies_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`","name":"X-API-KEY","in":"header"}},"schemas":{"User":{"properties":{"uuid":{"type":"string","format":"uuid"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"is_reseller":{"type":"boolean"},"verification":{"properties":{"status":{"type":"string","enum":["pending","verified","denied","suspected","expired","canceled","unverified"]},"is_verified":{"type":"boolean"}},"type":"object"},"created_at":{"type":"string","format":"date-time"},"balance":{"properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string"}},"type":"object","nullable":true},"reseller":{"properties":{"id":{"type":"integer"},"discount_percentage":{"type":"number","format":"float"},"is_active":{"type":"boolean"}},"type":"object","nullable":true},"stats":{"properties":{"sub_users_count":{"type":"integer"},"active_subscriptions_count":{"type":"integer"},"total_invoices_count":{"type":"integer"}},"type":"object","nullable":true}},"type":"object"}}},"paths":{"/profile":{"get":{"tags":["Authentication"],"summary":"Get user profile","description":"Returns the user profile with optional related data (balance, reseller, stats).","operationId":"3cd6fc884a5cdac6e0e2f8fc393bd759","parameters":[{"name":"include","in":"query","description":"Comma-separated list of related data to include: balance, reseller, stats","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/User"}},"type":"object"}}}},"401":{"description":"Unauthorized"}}}}}}
```

## Get user statistics

> Returns usage statistics for the authenticated user.

```json
{"openapi":"3.0.0","info":{"title":"PlainProxies API v2","version":"2.0.0"},"tags":[{"name":"Authentication","description":"Authentication and profile endpoints"}],"servers":[{"url":"https://dashboard.plainproxies.com/api/v2","description":"Production API Server"},{"url":"https://plainproxies-sandbox.com/api/v2","description":"Sandbox API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"API Key authentication. Get your key from the Dashboard Settings page. Include in all requests as: `X-API-KEY: PlainProxies_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`","name":"X-API-KEY","in":"header"}}},"paths":{"/profile/stats":{"get":{"tags":["Authentication"],"summary":"Get user statistics","description":"Returns usage statistics for the authenticated user.","operationId":"03f6c36d7881474a5a4a0fe9226dc9ca","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"properties":{"total_sub_users":{"type":"integer"},"active_sub_users":{"type":"integer"},"total_subscriptions":{"type":"integer"},"active_subscriptions":{"type":"integer"},"total_invoices":{"type":"integer"},"total_spent":{"type":"string"},"unlimited_accounts":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}}}}}}
```

## Get reseller information

> Returns reseller-specific information if the user is a reseller.

```json
{"openapi":"3.0.0","info":{"title":"PlainProxies API v2","version":"2.0.0"},"tags":[{"name":"Authentication","description":"Authentication and profile endpoints"}],"servers":[{"url":"https://dashboard.plainproxies.com/api/v2","description":"Production API Server"},{"url":"https://plainproxies-sandbox.com/api/v2","description":"Sandbox API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"API Key authentication. Get your key from the Dashboard Settings page. Include in all requests as: `X-API-KEY: PlainProxies_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`","name":"X-API-KEY","in":"header"}}},"paths":{"/profile/reseller":{"get":{"tags":["Authentication"],"summary":"Get reseller information","description":"Returns reseller-specific information if the user is a reseller.","operationId":"1fbb647a88c8ea735aac6576cfb310e6","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"properties":{"is_reseller":{"type":"boolean"},"reseller_id":{"type":"string"},"balance":{"type":"string"},"discount":{"type":"number","format":"float"},"resi_ipv4_per_gb_price":{"type":"string"},"auto_replenish":{"properties":{"enabled":{"type":"boolean"},"threshold":{"type":"string"},"amount":{"type":"string"}},"type":"object"},"products":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"User is not a reseller"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plainproxies.com/resller-api-documentation/overview-1/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
