Skip to content

Authentication API

Base URL: https://your-domain.com

Authentication endpoints for both admin/staff users and subscribers.


Modules

ModuleDescription
📁 User AuthenticationAdmin/Staff login, logout, token refresh
📁 Subscriber AuthenticationSubscriber login, logout, token refresh

Quick Reference

User Authentication

MethodEndpointDescription
POST/api/v1/auth/loginAdmin/Staff login
POST/api/v1/auth/logoutLogout
POST/api/v1/auth/refreshRefresh token
GET/api/v1/auth/userGet user info

Subscriber Authentication

MethodEndpointDescription
POST/api/v1/subscriber/auth/loginSubscriber login
POST/api/v1/subscriber/auth/logoutSubscriber logout
POST/api/v1/subscriber/auth/refreshRefresh token
GET/api/v1/subscriber/auth/profileGet profile

Token Usage

After successful login, include the token in all authenticated requests:

http
Authorization: Bearer your-auth-token

Token Expiry

  • Access Token: 60 minutes
  • Refresh Token: 7 days

Use the refresh endpoint to get a new access token before expiry.

www.onezeroart.com