蓝石科技-公益验证码接口

最新版本:v1.0.4  |  更新日期:2026-03-23

更新日志


如有问题及时反馈,联系QQ:3324587869


一个免费的验证码发送服务,支持发送验证码到QQ邮箱和网易邮箱。

使用须知

重要说明:使用本API接口服务即视为您同意《服务协议》《隐私政策》的全部内容。

在线测试

直接访问:https://lanshi.bokexia.com/Example.html

Logo图片上传流程

由于Logo图片需审核,为防止违规图片,当前采用以下机制:

  1. 通过图片上传页面上传图片,获得审核密钥
  2. 若长时间未通过请联系管理员(QQ:3324587869)审核图片
  3. 审核通过后,在发送登录提醒时输入对应token即可使用该图片

如何调用

方式一:网页表单

<form action="https://lanshi.bokexia.com/api/send_code.php" method="POST">
    <input type="email" name="email" placeholder="邮箱地址" required>
    <input type="text" name="senderName" placeholder="企业名称(1-8字,选填)">
    <input type="text" name="logo_token" placeholder="Logo审核token(选填)">
    <select name="codeType">
        <option value="numeric">数字验证码</option>
        <option value="alphanumeric">字母数字验证码</option>
    </select>
    <button type="submit">发送</button>
</form>

方式二:JavaScript

fetch('https://lanshi.bokexia.com/api/send_code.php', {
    method: 'POST',
    body: new URLSearchParams({
        email: '用户邮箱@qq.com',
        senderName: '你的名称',
        logo_token: '审核通过的token',
        codeType: 'numeric',
        type: 'register'
    })
})
.then(res => res.json())
.then(data => {
    if (data.status === 'success') {
        console.log('验证码:', data.code);
    }
});

方式三:PHP

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://lanshi.bokexia.com/api/send_code.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'email' => '用户邮箱@qq.com',
    'senderName' => '你的名称',
    'logo_token' => '审核通过的token',
    'codeType' => 'numeric',
    'type' => 'register'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
if ($result['status'] === 'success') {
    $code = $result['code'];
}

方式四:Python

import requests

data = {
    'email': 'user@qq.com',
    'senderName': '你的名称',
    'codeType': 'numeric',
    'type': 'register'
}
response = requests.post('https://lanshi.bokexia.com/api/send_code.php', data=data)
result = response.json()

if result['status'] == 'success':
    code = result['code']

方式五:命令行

curl -X POST https://lanshi.bokexia.com/api/send_code.php -d "email=test@qq.com" -d "senderName=你的名称" -d "logo_token=审核通过的token" -d "codeType=numeric" -d "type=register"

参数说明

其他API接口

验证验证码

方式一:网页表单

<form action="https://lanshi.bokexia.com/api/verify_code.php" method="POST">
    <input type="email" name="email" placeholder="邮箱地址" required>
    <input type="text" name="code" placeholder="验证码" required>
    <select name="type">
        <option value="register">注册</option>
        <option value="login">登录</option>
        <option value="reset">重置密码</option>
    </select>
    <button type="submit">验证</button>
</form>

方式二:JavaScript

fetch('https://lanshi.bokexia.com/api/verify_code.php', {
    method: 'POST',
    body: new URLSearchParams({
        email: '用户邮箱@qq.com',
        code: '123456',
        type: 'register'
    })
})
.then(res => res.json())
.then(data => {
    if (data.status === 'success') {
        console.log('验证成功');
    }
});

方式三:PHP

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://lanshi.bokexia.com/api/verify_code.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'email' => '用户邮箱@qq.com',
    'code' => '123456',
    'type' => 'register'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
if ($result['status'] === 'success') {
    echo '验证成功';
}

方式四:Python

import requests

data = {
    'email': 'user@qq.com',
    'code': '123456',
    'type': 'register'
}
response = requests.post('https://lanshi.bokexia.com/api/verify_code.php', data=data)
result = response.json()

if result['status'] == 'success':
    print('验证成功')

方式五:命令行

curl -X POST https://lanshi.bokexia.com/api/verify_code.php -d "email=test@qq.com" -d "code=123456" -d "type=register"

查询状态

方式一:网页表单

<form action="https://lanshi.bokexia.com/api/check_code_status.php" method="POST">
    <input type="email" name="email" placeholder="邮箱地址" required>
    <select name="type">
        <option value="register">注册</option>
        <option value="login">登录</option>
        <option value="reset">重置密码</option>
    </select>
    <button type="submit">查询</button>
</form>

方式二:JavaScript

fetch('https://lanshi.bokexia.com/api/check_code_status.php', {
    method: 'POST',
    body: new URLSearchParams({
        email: '用户邮箱@qq.com',
        type: 'register'
    })
})
.then(res => res.json())
.then(data => {
    if (data.status === 'success') {
        console.log('查询成功:', data);
    }
});

方式三:PHP

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://lanshi.bokexia.com/api/check_code_status.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'email' => '用户邮箱@qq.com',
    'type' => 'register'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
if ($result['status'] === 'success') {
    print_r($result);
}

方式四:Python

import requests

data = {
    'email': 'user@qq.com',
    'type': 'register'
}
response = requests.post('https://lanshi.bokexia.com/api/check_code_status.php', data=data)
result = response.json()

if result['status'] == 'success':
    print('查询成功:', result)

方式五:命令行

curl -X POST https://lanshi.bokexia.com/api/check_code_status.php -d "email=test@qq.com" -d "type=register"

登录提醒

方式一:网页表单

<form action="https://lanshi.bokexia.com/api/send_login_alert.php" method="POST">
    <input type="email" name="email" placeholder="邮箱地址" required>
    <input type="text" name="senderName" placeholder="企业名称(1-8字,选填)">
    <input type="text" name="logo_token" placeholder="Logo审核token(选填)">
    <input type="text" name="username" placeholder="用户名(选填)">
    <button type="submit">发送登录提醒</button>
</form>

方式二:JavaScript

fetch('https://lanshi.bokexia.com/api/send_login_alert.php', {
    method: 'POST',
    body: new URLSearchParams({
        email: '用户邮箱@qq.com',
        senderName: '你的名称',
        logo_token: '审核通过的token',
        username: '用户名'
    })
})
.then(res => res.json())
.then(data => {
    if (data.status === 'success') {
        console.log('登录提醒已发送');
    }
});

方式三:PHP

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://lanshi.bokexia.com/api/send_login_alert.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'email' => '用户邮箱@qq.com',
    'senderName' => '你的名称',
    'logo_token' => '审核通过的token',
    'username' => '用户名'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
if ($result['status'] === 'success') {
    echo '登录提醒已发送';
}

方式四:Python

import requests

data = {
    'email': 'user@qq.com',
    'senderName': '你的名称',
    'logo_token': '审核通过的token',
    'username': '用户名'
}
response = requests.post('https://lanshi.bokexia.com/api/send_login_alert.php', data=data)
result = response.json()

if result['status'] == 'success':
    print('登录提醒已发送')

方式五:命令行

curl -X POST https://lanshi.bokexia.com/api/send_login_alert.php -d "email=test@qq.com" -d "senderName=你的名称" -d "logo_token=审核通过的token" -d "username=用户名"

登录提醒接口参数说明:

返回格式

成功:

{"status": "success", "message": "验证码已发送", "code": "123456"}

失败:

{"status": "error", "message": "错误原因"}

注意事项