Auth & Identity
Register users, authenticate with OAuth 2.0 or API keys, manage sessions, and handle password recovery. All authentication endpoints use TLS 1.3 and are rate-limited.
/api/v1/authEndpoints
POST
/api/v1/auth/registerRegister a new user account with email and password
POST
/api/v1/auth/loginAuthenticate and receive access + refresh tokens
POST
/api/v1/auth/refreshExchange a refresh token for a new access token
GET
/api/v1/auth/meGet the authenticated user's profile
POST
/api/v1/auth/forgot-passwordInitiate password reset via email
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Required | User email address | |
| password | string | Required | User password (min 12 characters) |
| grant_type | string | Optional | OAuth grant type (authorization_code or refresh_token) |
Example
Request
http
POST /api/v1/auth/login HTTP/1.1
Host: api.tpay365.com
Content-Type: application/json
{
"email": "developer@example.com",
"password": "secure_password_here"
}Response
json
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"refresh_token": "rt_abc123def456",
"token_type": "bearer",
"expires_in": 3600,
"scope": "read:profile write:paycheck"
}