初始化接口

SDK初始化获取应用配置

接口状态:正常
返回接口列表

接口信息

接口地址
https://verify.rokig.fun/api.php?api=ini
返回格式
json
请求方式
json
请求示例
https://api.example.com

请求参数说明

名称变量必填类型说明
接口 api GET 填写ini
应用 app GET 填写后台应用APPID

返回参数说明

名称类型说明
code String 返回状态
version String 应用版本
version_info String 版本信息或购买卡密链接
app_update_show String 更新内容
app_update_url String 更新地址
app_update_pwd String 文件提取码
Trial_mode String 应用试用模式(返回close则为关闭试用,返回kami则为卡密模式,返回time则为时间模式)
trial_kami String 应用试用卡密或试用到期时间
app_name String 应用软件名称
app_qq String 应用客服QQ
app_groupchat String 应用群聊信息
app_img String 应用软件LOGO
app_background String 应用软件背景信息
app_diy String 应用软件DIY模板
app_update_must String 开启强制更新返回"y",关闭则返回"n"
app_switch String 应用付费使用返回"y",免费则返回"n"

返回示例

返回示例
{
    "code": 200,
    "msg": {
        "version": "1.0",
        "version_info": "1.0、欢迎使用R验云\n2.0、全新版本正式发布",
        "app_update_show": "全新版本已发布,请及时更新",
        "app_update_url": "http://baidu.com/更新地址",
        "app_update_pwd":"文件提取码",
        "app_name":"测试应用",
        "app_qq":"客服QQ号",
        "app_groupchat":"售后群号或链接",
        "app_img":"域名/assets/img/Program/program_461ecbe9f4945f36220f7dba196d956f.png",
        "app_background":"域名/assets/img/Program/program_461ecbe9f4945f36220f7dba196d956f.png",
        "trial_kami": "试用卡密",
        "app_update_must": "y",
        "app_switch":"y",
        "api_total":"32004"},
    "time":1726932703,
    "check":"093bad3c4ff19e54ab8d913ed98e9e31"
}

错误码参照

名称类型说明
101 String 应用不存在
102 String 应用已关闭
171 String 接口维护中
172 String 接口未添加或不存在

示例代码

C++ 示例代码
// R验云网络验证 - 应用配置 接口调用示例(C++)
// 编译:g++ -o ini ini.cpp -lcurl
#include <iostream>
#include <string>
#include <curl/curl.h>

// 回调函数:接收服务器返回的数据
static size_t write_callback(void *contents, size_t size, size_t nmemb, void *userp) {
    ((std::string*)userp)->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    std::string appid = "你的APPID";  // 后台应用 APPID
    std::string api = "ini";
    std::string url = "https://verify.rokig.fun/api.php?api=" + api + "&app=" + appid;

    // 请求参数(是=必填,否=选填,本接口无额外参数)
    std::string params = "";

    // 发送请求
    CURL *curl = curl_easy_init();
    std::string response;
    if (curl) {
        std::string request_url = url + (params.empty() ? "" : "&" + params);
        curl_easy_setopt(curl, CURLOPT_URL, request_url.c_str());
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
        CURLcode res = curl_easy_perform(curl);
        curl_easy_cleanup(curl);
        if (res != CURLE_OK) {
            std::cerr << "请求失败: " << curl_easy_strerror(res) << std::endl;
            return 1;
        }
    }

    // 输出返回结果(JSON,code 为 200 表示成功)
    std::cout << "返回结果: " << response << std::endl;
    return 0;
}