API 文档

GET
https://finalshell.662662.xyz/api.php?action=options

获取支持的软件版本和类型选项

请求参数

参数名 类型 是否必需 描述
action 字符串 是 固定为"options"

响应示例

{ "status": "success", "versions": [ {"value": "v46", "name": "v4.6版本"}, {"value": "new", "name": "新版"} ], "types": [ {"value": "adv", "name": "高级版"}, {"value": "pro", "name": "专业版"} ] }
GET
https://finalshell.662662.xyz/api.php?machineCode={machineCode}&version={version}&type={type}

通过GET请求获取FinalShell激活码

请求参数

参数名 类型 是否必需 描述
machineCode 字符串 是 FinalShell的机器码
version 字符串 否 软件版本 ()
type 字符串 否 版本类型 ()

响应示例

{ "status": "success", "message": "激活码生成成功", "machineCode": "1234567890ABCDEF", "version": "new", "type": "pro", "activationCode": "d41d8cd98f00b204", "timestamp": "2025-06-13 12:34:56", }
POST
https://finalshell.662662.xyz/api.php

通过POST请求获取FinalShell激活码

请求参数

请求体应为JSON格式,包含以下参数:

{ "machineCode": "1234567890ABCDEF", "version": "new", "type": "pro" }

响应示例

{ "status": "success", "message": "激活码生成成功", "machineCode": "1234567890ABCDEF", "version": "new", "type": "pro", "activationCode": "d41d8cd98f00b204", "timestamp": "2025-06-13 12:34:56", }

使用示例

JavaScript 示例

使用 Fetch API 调用 GET 请求

// 发送GET请求 fetch('https://finalshell.662662.xyz/api.php?machineCode=123456&version=new&type=pro') .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));

🐍 Python 示例

使用 requests 库调用 POST 请求

import requests import json # 设置API端点 url = "https://finalshell.662662.xyz/api.php" # 准备请求数据 data = { "machineCode": "1234567890ABCDEF", "version": "v46", "type": "adv" } # 发送POST请求 response = requests.post(url, json=data) print(response.json())

⌨️ cURL 示例

使用 cURL 调用 GET 请求

curl "https://finalshell.662662.xyz/api.php?machineCode=1234567890ABCDEF&version=new&type=pro"

🐘 PHP 示例

使用 file_get_contents 调用 API

// 设置API端点和数据 $url = 'https://finalshell.662662.xyz/api.php'; $data = [ 'machineCode' => '1234567890ABCDEF', 'version' => 'new', 'type' => 'pro' ]; // 创建HTTP上下文 $options = [ 'http' => [ 'method' => 'POST', 'header' => 'Content-type: application/json', 'content' => json_encode($data) ] ]; // 发送请求并获取响应 $context = stream_context_create($options); $result = file_get_contents($url, false, $context); $response = json_decode($result, true); // 输出响应 print_r($response);