生成与请求的操作系统和浏览器类型匹配的 User-Agent。
- 前置条件:Firefox 只能配 Windows 或 macOS,且
osVersion必须是受支持的版本之一。 - 副作用:无,但结果不是确定性的——同样的请求每次返回不同的 User-Agent。不要把它当缓存键。
- 完成信号:同步。可安全重试。
- Open API:只使用已发布的内核来构造 User-Agent,不读取任何客户端信息。
Security
OpenApiBearer
操作系统:
1— Windows2— macOS3— Android4— iOS5— Linux
Enum:12345
Example:1
操作系统版本。默认为空字符串。
Enum:"""Windows 7""Windows 8""Windows 10""Windows 11""macOS 12""macOS 13""macOS 14"
Example:"Windows 11"
- https://api.morelogin.comhttps://api.morelogin.com/env/advanced/ua/get
curl -i -X POST \
https://api.morelogin.com/env/advanced/ua/get \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"os": 1,
"osVersion": "Windows 11",
"vendor": 1,
"systemBitType": 1,
"architecture": 0
}'成功
Operation request ID. This field may be present when the request passes through the API gateway.
Example:"1d4f3ea968664593860b94b35d4ebf5e"
Response
{ "code": 0, "msg": null, "requestId": "0d8b6f1c-9f4e-4d02-9d1a-7c3f5a1b2c3d", "data": { "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36", "resolution": { … }, "mobileDevice": null } }