API Request Overview
This topic introduces the communication protocols, communication port, and request flow of the Yeastar P-Series Software Edition API.
Communication protocols
Yeastar P-Series Software Edition supports GET and POST request over HTTP or HTTPS protocol.
For communication security, we recommend that you use HTTPS protocol, and upload an HTTPS certificate to the PBX to authenticate and enable an encrypted secure connection.
Communication port
The API communication port is the same as the web access port of PBX. By default, the communication ports are HTTPS 8088 and HTTP 80.
API request flow
After a third-party application is connected to Yeastar P-Series Software Edition, the third-party application acts as the client, while the PBX acts as the server.
The workflow of the API request is shown below:
Every time the third-party application sends an API request to the PBX, a new TCP connection is established. After the PBX returns a response to the application, the TCP connection is closed.For the first request, the application needs to send credentials to request for an access token. The PBX verifies the credentials and returns an access token. In the subsequent requests, the application should include the access token in every request for authenticated API calls. The PBX validates the access token and returns a response with requested resources.