Authentication
Manage authentication.
Retrieve system metadata information.
If the optional domain query parameter is specified,
the relevant tenant metadata information will be returned together.
System metadata:
web_domainprivate_ipv4public_ipv4enable_ipv6private_ipv6public_ipv6primary_dns_serversecondary_dns_serverenable_dataflowTenant metadata:namedomainwebsiteavatar_urlenable_ms365_integrationms365_authorization_endpoint
Use the domain query parameter to retrieve just a subset of a collection.
OK
The web domain for PortSIP PBX
The private IPv4 of system.
The public IPv4 of system.
Indicates if IPv6 would be enabled.
trueThe private IPv6 of system.
The public IPv6 of system.
The primary DNS server.
The secondary DNS server.
The name of the tenant.
The SIP domain of tenant.
It is usually a fully qualified domain name (FQDN).
If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain.
The SIP domain name is only used for SIP message authentication and does not require analysis.
The official website of tenant.
The relative path to file url for file downloading.
/api/blobs/WexWdABcd5D4PDgzTKV3gAAAEu00WcKMicrosoft 365 SSO integration enabled or not.
The Microsoft Identity Provider authorization endpoint for this tenant.
Dataflow service enabled or not.
Error
GET /api/info HTTP/1.1
Host: HOSTNAME:8887
Accept: */*
{
"web_domain": "example.com",
"private_ipv4": "127.0.0.1",
"public_ipv4": "127.0.0.1",
"enable_ipv6": false,
"private_ipv6": "::1",
"public_ipv6": "::1",
"primary_dns_server": "127.0.0.1",
"secondary_dns_server": "127.0.0.1",
"name": "example",
"domain": "example.com",
"website": "example.com",
"avatar_url": "avatar.com/avatar",
"enable_ms365_integration": false,
"ms365_authorization_endpoint": "/ms365",
"enable_dataflow": true
}Sign in with credentials
falseThe user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.
The password of user.
The SIP domain of tenant.
It is usually a fully qualified domain name (FQDN).
If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain.
The SIP domain name is only used for SIP message authentication and does not require analysis.
OK
Error
POST /api/auth/sign_in HTTP/1.1
Host: HOSTNAME:8887
Content-Type: application/json
Accept: */*
Content-Length: 47
{
"username": null,
"password": null,
"domain": null
}{
"access_token": "xxxxxxxxxxx",
"refresh_token": "xxxxxxxxxxxxx",
"token_type": "Bearer",
"expires_in": 1800
}Sign in with social account
The name of IdP provider. Currently only supports microsoft.
The SIP domain of tenant.
It is usually a fully qualified domain name (FQDN).
If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain.
The SIP domain name is only used for SIP message authentication and does not require analysis.
The callback url for authentication flow.
OK
The IdP authentication url.
Error
POST /api/auth/sign_in/{provider} HTTP/1.1
Host: HOSTNAME:8887
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"domain": null,
"callback_url": null
}{
"url": null
}Sign out from system.
OK
No content
Error
POST /api/auth/sign_out HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Request to send OTP to email.
The session token in authentication flow.
OK
No content
Error
POST /api/auth/send_otp HTTP/1.1
Host: HOSTNAME:8887
Content-Type: application/json
Accept: */*
Content-Length: 14
{
"token": null
}No content
Request to verify OTP from email.
The session token in authentication flow.
The OTP code in authentication flow.
OK
No content
Error
POST /api/auth/verify_otp HTTP/1.1
Host: HOSTNAME:8887
Content-Type: application/json
Accept: */*
Content-Length: 26
{
"token": null,
"code": null
}No content
Initiate authentication forget password flow.
The SIP domain of tenant.
It is usually a fully qualified domain name (FQDN).
If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain.
The SIP domain name is only used for SIP message authentication and does not require analysis.
The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.
The callback url for authentication flow.
OK
No content
Error
POST /api/auth/forget_password HTTP/1.1
Host: HOSTNAME:8887
Content-Type: application/json
Accept: */*
Content-Length: 67
{
"domain": null,
"username": null,
"callback_url": null,
"required": null
}No content
Reset password with session token.
The session token in authentication flow.
The password of user.
OK
No content
Error
POST /api/auth/reset_password HTTP/1.1
Host: HOSTNAME:8887
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"token": null,
"new_password": null
}No content
Refresh the access token.
The refresh token.
OK
The token type.
The access token.
The refresh token.
The access token expiration time in seconds.
Error
POST /api/auth/refresh_token HTTP/1.1
Host: HOSTNAME:8887
Content-Type: application/json
Accept: */*
Content-Length: 22
{
"refresh_token": null
}{
"token_type": "text",
"access_token": "text",
"refresh_token": "text",
"expires_in": 1
}Get the authentication information of the logged-in user.
OK
The SIP domain of tenant.
It is usually a fully qualified domain name (FQDN).
If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain.
The SIP domain name is only used for SIP message authentication and does not require analysis.
The unique ID of the resource.
NzAwNTUxOTA5NzczMTQ4MTYwRoles include built-in roles and custom roles.
Built-in roles roles cannot be modified.
Also, the names of built-in roles are reserved words,
custom roles are not allowed to use these names to avoid unnecessary confusion.
Built-in roles include:
SystemAdmin: the system administrator has almost all permissions.OperationsAdmin: the operations administrator.SiteAdmin: the site administrator.Dealer: the sales manager has all sold tenant resource permissions.Admin: the admin has all tenant-wide resource permissions.StandardUser: the user all user-wide resource permissions.StandardInternationalUser: the user all user-wide resource permissions with international call permissions.QueueManager: The call queue manager.
UserThe permission string.
Whether the user password has been verified.
trueWhether to force reset the initial password.
falseUnauthorized
GET /api/auth/user HTTP/1.1
Host: HOSTNAME:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"domain": null,
"role_id": null,
"role_name": null,
"capabilities": null,
"password_verified": null,
"password_force_reset": null
}Get login status of current session.
OK
Access token to be passed as a header
4DFCF1D4C30B4D798ECE3AE43769F008.The expiration date of the access token in RFC 3339 format, for example, 2017-07-21T17:32:28Z.
The RFC 3339 format is defined by RFC 3339, section 5.6
2017-07-21T17:32:28ZThe number of seconds that the access token will be valid.
1800Roles include built-in roles and custom roles.
Built-in roles roles cannot be modified.
Also, the names of built-in roles are reserved words,
custom roles are not allowed to use these names to avoid unnecessary confusion.
Built-in roles include:
SystemAdmin: the system administrator has almost all permissions.OperationsAdmin: the operations administrator.SiteAdmin: the site administrator.Dealer: the sales manager has all sold tenant resource permissions.Admin: the admin has all tenant-wide resource permissions.StandardUser: the user all user-wide resource permissions.StandardInternationalUser: the user all user-wide resource permissions with international call permissions.QueueManager: The call queue manager.
UserUnauthorized
GET /api/login HTTP/1.1
Host: HOSTNAME:8887
Accept: */*
{
"access_token": null,
"expires_at": null,
"expires_in": null,
"role": null
}Login with username and password.
The user's account name.
Only letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).
Username cannot start or end with period (.).
admin, system, administrator, and root are reserved names for system admin only with case ignored.
The password of user.
The SIP domain of tenant.
It is usually a fully qualified domain name (FQDN).
If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain.
The SIP domain name is only used for SIP message authentication and does not require analysis.
OK
No content
Error
POST /api/login HTTP/1.1
Host: HOSTNAME:8887
Content-Type: application/json
Accept: */*
Content-Length: 47
{
"username": null,
"password": null,
"domain": null
}No content
login with Microsoft Identity Provider by Authorization Code Flow.
The SIP domain of tenant.
It is usually a fully qualified domain name (FQDN).
If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain.
The SIP domain name is only used for SIP message authentication and does not require analysis.
OK
No content
Found
Error
POST /api/login/by_microsoft HTTP/1.1
Host: HOSTNAME:8887
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 15
"domain=null"No content
Last updated
Was this helpful?