BetaYou're exploring an early version of tPay365. Features and content may change as we refine the experience.

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/auth

Endpoints

POST
/api/v1/auth/register

Register a new user account with email and password

POST
/api/v1/auth/login

Authenticate and receive access + refresh tokens

POST
/api/v1/auth/refresh

Exchange a refresh token for a new access token

GET
/api/v1/auth/me

Get the authenticated user's profile

POST
/api/v1/auth/forgot-password

Initiate password reset via email

Parameters

ParameterTypeRequiredDescription
emailstringRequiredUser email address
passwordstringRequiredUser password (min 12 characters)
grant_typestringOptionalOAuth 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"
}