-
Notifications
You must be signed in to change notification settings - Fork 0
Authentication
FlashForge printers use different authentication models depending on the printer series and protocol being used.
| Printer Series | HTTP API (8898) | TCP API (8899) |
|---|---|---|
| Adventurer 3 Series | N/A | None |
| Adventurer 4 Pro | N/A | None |
| Adventurer 5M | CheckCode | None |
| Adventurer 5M Pro | CheckCode | None |
| AD5X | CheckCode | None |
Applicability: Adventurer 5M, 5M Pro, AD5X
Modern printers use a static shared secret authentication model for the HTTP REST API.
| Field | Description | Location |
|---|---|---|
| serialNumber | Printer's unique serial number | Printer settings menu |
| checkCode | Static registration code | Printer settings menu (called "Check Code" or "Verify Code") |
- Navigate to the printer's Settings menu on the LCD display
- Look for "Network", "About", or "Device Info" section
- Find the Serial Number (typically starts with "SN" followed by model identifier)
- Find the Check Code (typically a 4-5 digit numeric code)
Used for most HTTP endpoints (/detail, /control, /gcodeList, etc.).
POST http://10.0.0.42:8898/detail
Content-Type: application/json
{
"serialNumber": "SNADVA5MXXXXX",
"checkCode": "12345"
}Used for the /uploadGcode endpoint (multipart/form-data requests).
POST http://10.0.0.42:8898/uploadGcode
Content-Type: multipart/form-data
serialNumber: SNADVA5MXXXXX
checkCode: 12345
fileSize: 1234567
printNow: 1
[multipart form data]Note: Boolean header values use "0" or "1" string format, not "true"/"false".
Invalid credentials return HTTP 200 with error code 3:
{
"code": 3,
"message": "Unauthorized"
}Applicability: Adventurer 3, Adventurer 4 Pro, and all series on port 8899
Connect to: 10.0.0.42:8899
Send: ~M601
Response: CMD M601 Received.
Control Success V2.1.
ok
While there is no credential validation, the TCP protocol uses a session model:
| Command | Purpose |
|---|---|
| M601 | Request control session |
| M602 | Release control session |
Only one control session can be active at a time. If M601 fails with "Control Failed", another client is connected.
HTTP API: serialNumber + checkCode required
TCP API: No authentication (M601 session only)
HTTP API: Not available
TCP API: No authentication (M601 session only)
Valid Request:
POST http://10.0.0.42:8898/detail HTTP/1.1
Content-Type: application/json
{"serialNumber":"SNADVA5MXXXXX","checkCode":"12345"}
Response: {"code":0,"message":"Success","detail":{...}}Invalid Request:
POST http://10.0.0.42:8898/detail HTTP/1.1
Content-Type: application/json
{"serialNumber":"SNADVA5MXXXXX","checkCode":"wrong"}
Response: {"code":3,"message":"Unauthorized"}