首页 星座算命 性格测试
性格测试

性格测试

  • 124
  • 566
MBTI性格测试
免费
https://api.jisuapi.com/character/questions
JSON,JSONP
GET POST
https://api.jisuapi.com/character/questions?appkey=yourappkey

请求参数:

API在线测试
参数名称类型必填说明

返回参数:

参数名称类型说明
id string 问题序号
question string 问题
answer1 string 答案A
answer2 string 答案B
type1 string 答案A的选项值
type2 string 答案B的选项值

请求代码:

查看代码
<?php
 
$appkey = 'your_appkey_here';//你的appkey
$url = "https://api.jisuapi.com/character/questions?appkey=$appkey";
 
$result = curlOpen($url, array('ssl'=>true));
 
$jsonarr = json_decode($result, true);
 
if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}
                    

JSON返回示例 :

{
    "status": 0,
    "msg": "ok",
    "result": [
        {
            "id": 1,
            "question": "当你某日想去某个地方,你会__?",
            "answer1": "计划好将做的事情以及何时做",
            "answer2": "什么都不想就去",
            "type1": "x1",
            "type2": "x2"
        },
        {
            "id": 2,
            "question": "如果你是一位老师,你愿教__?",
            "answer1": "涉及事实的课程",
            "answer2": "涉及理论的课程",
            "type1": "x3",
            "type2": "x4"
        },
        {
            "id": 3,
            "question": "你通常是__?",
            "answer1": "一个善于交际的人",
            "answer2": "安静缄默的人",
            "type1": "x5",
            "type2": "x6"
        }
    ]
}
                    

API错误码:

代号说明
201 答案不足
210 没有信息

系统错误码:

代号说明
101 APPKEY为空或不存在
102 APPKEY已过期
103 APPKEY无请求此数据权限
104 请求超过次数限制
105 IP被禁止
106 IP请求超过限制
107 接口维护中
108 接口已停用

活动推荐ACTIVITY 更多

  • orc活动

其它推荐RECOMMENDED DATA 更多