Operator / User Authentication
POST
/auth/login
const url = 'https://pbx.ring2all.com/api/v1/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"username":"admin@carrier.ring2all.com","password":"Secr3tP@ssw0rd!"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://pbx.ring2all.com/api/v1/auth/login \ --header 'Content-Type: application/json' \ --data '{ "username": "admin@carrier.ring2all.com", "password": "Secr3tP@ssw0rd!" }'Authenticates user credentials and returns a signed JWT access token and refresh token.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
username
required
string
Example
admin@carrier.ring2all.compassword
required
string format: password
Example
Secr3tP@ssw0rd!Responses
Section titled “ Responses ”Authentication successful
Media typeapplication/json
object
token
string
expires_in
integer
user
object
id
integer
tenant_id
integer
role
string
Example
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "expires_in": 86400, "user": { "id": 1, "tenant_id": 10, "role": "superadmin" }}Invalid credentials

