Skip to content

XP API Documentation Recent

This interface can be accessed using HTTP and WebSocket. Both port numbers are 9911.

HTTP Request

  • Interface address: http://IP_ADDRESS:9911/api
  • Example: http://127.0.0.1:9911/api
  • Request methods: GET, POST (JSON), POST (form)

WebSocket Request

Using WebSocket provides faster response but is more complex. All request results are in the callback function. Requires async-to-sync conversion for sequential operations.

  • Interface address: ws://SERVER_ADDRESS:9911/api
  • Example: ws://127.0.0.1:9911/api
  • Request format: json

Each interface has a msgid field returned as-is by the server for async-to-sync conversion.

Response Format

All interfaces return status 200 for success. Failure info is in message. Actual execution result is in data.

Error Codes

CodeDescription
0Success
1ID does not exist
2Device is not bound to hardware
3Hardware not connected
4Collection failed
5A device is collecting
6Device ID is not collecting mouse
7Device ID does not exist or device is online
8Scan code opened successfully
9Enter the collection page
10Hardware ID is empty
11No mouse parameters
12Hardware and mobile phone connection
13Hardware is not connected to the phone
14Start working
15No coordinates
16Hardware is not working (unknown error)
17Retry on failure
18Failure stop
19Hardware and computer connection
20Hardware disconnected from computer
21At work
22Equipment online
23Hardware unbound device
24Hardware not turned on
25Device is offline
26Screenshot failed
27Path does not exist
28Plugin not connected
29Calling the plugin interface times out
30Call timeout
31OCR did not recognize text
32No text found
33Fail
34Remove device from group first
35File list is empty or files don't exist
36Parameter error
37Login failed
38Registration failed
39Password reset failed
40Failed to send verification code
41Incompatible commands

API Sections

Some3C Phone Farm Documentation