Skip to content

查看回调接口

接口信息

  • 接口: /agent-api/user/{user_id}/identification/{unique_id}
  • 请求方式: GET

路由参数

参数类型示例解释必填
user_idstringf00c8abc-433f-4666-a9d6-70479605ced1用户 id
unique_idstringafba23d9-4fd8-4dd9-a6b8-3837442abef3批次 id

请求参数

参数类型示例解释必填
sub_user_idstring91f9254f-ca58-49af-be34-8370d7549d73子账户 id(传递此参数则是对子账户操作)

请求示例

cURL
curl -X GET "https://ai.api.longlonglong.cn/agent-api/user/f00c8abc-433f-4666-a9d6-70479605ced1/identification/afba23d9-4fd8-4dd9-a6b8-3837442abef3?sub_user_id=91f9254f-ca58-49af-be34-8370d7549d73" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
Go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "https://ai.api.longlonglong.cn/agent-api/user/f00c8abc-433f-4666-a9d6-70479605ced1/identification/afba23d9-4fd8-4dd9-a6b8-3837442abef3?sub_user_id=91f9254f-ca58-49af-be34-8370d7549d73", nil)
    if err != nil {
        panic(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer YOUR_TOKEN")

    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
JavaScript
const axios = require('axios');

axios.get('https://ai.api.longlonglong.cn/agent-api/user/f00c8abc-433f-4666-a9d6-70479605ced1/identification/afba23d9-4fd8-4dd9-a6b8-3837442abef3', {
    params: {
        sub_user_id: '91f9254f-ca58-49af-be34-8370d7549d73'
    },
    headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_TOKEN'
    }
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error);
});
Java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String[] args) throws Exception {
        URL url = new URL("https://ai.api.longlonglong.cn/agent-api/user/f00c8abc-433f-4666-a9d6-70479605ced1/identification/afba23d9-4fd8-4dd9-a6b8-3837442abef3?sub_user_id=91f9254f-ca58-49af-be34-8370d7549d73");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("GET");
        conn.setRequestProperty("Content-Type", "application/json");
        conn.setRequestProperty("Authorization", "Bearer YOUR_TOKEN");

        BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        StringBuilder response = new StringBuilder();
        while ((line = br.readLine()) != null) {
            response.append(line);
        }
        br.close();
        System.out.println(response.toString());
    }
}
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://ai.api.longlonglong.cn/agent-api/user/f00c8abc-433f-4666-a9d6-70479605ced1/identification/afba23d9-4fd8-4dd9-a6b8-3837442abef3?sub_user_id=91f9254f-ca58-49af-be34-8370d7549d73",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json",
        "Authorization: Bearer YOUR_TOKEN"
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
Python
import requests

url = "https://ai.api.longlonglong.cn/agent-api/user/f00c8abc-433f-4666-a9d6-70479605ced1/identification/afba23d9-4fd8-4dd9-a6b8-3837442abef3"
params = {"sub_user_id": "91f9254f-ca58-49af-be34-8370d7549d73"}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_TOKEN"
}

response = requests.get(url, params=params, headers=headers)
print(response.json())
C++
#include <iostream>
#include <curl/curl.h>

size_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp) {
    ((std::string*)userp)->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    CURL* curl;
    CURLcode res;
    std::string readBuffer;

    curl = curl_easy_init();
    if(curl) {
        curl_easy_setopt(curl, CURLOPT_URL, "https://ai.api.longlonglong.cn/agent-api/user/f00c8abc-433f-4666-a9d6-70479605ced1/identification/afba23d9-4fd8-4dd9-a6b8-3837442abef3?sub_user_id=91f9254f-ca58-49af-be34-8370d7549d73");
        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Content-Type: application/json");
        headers = curl_slist_append(headers, "Authorization: Bearer YOUR_TOKEN");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
        res = curl_easy_perform(curl);
        curl_easy_cleanup(curl);
        std::cout << readBuffer << std::endl;
    }
    return 0;
}

返回结果

json
{
    "code": 200,
    "status": "success",
    "message": "查看回调记录成功",
    "data": {
        "user_id": "f00c8abc-433f-4666-a9d6-70479605ced1",
        "send_data": {
            "crmCustomerCount": 1,
            "unique_id": "afba23d9-4fd8-4dd9-a6b8-3837442abef3",
            "type": "add_customer_number",
            "task_id": null,
            "user_id": "f00c8abc-433f-4666-a9d6-70479605ced1"
        },
        "status": 1,
        "unique_id": "afba23d9-4fd8-4dd9-a6b8-3837442abef3",
        "task_id": null,
        "created_at": "2025-01-06 17:28:24"
    }
}

此接口可用于查询回调的接口以及相关的数据。

基于 MIT 许可发布