Relation Graph API
Relation ProtocolRelation ONE APIRelation Graph API
中文
中文
  • 概述
    • Relation Graph
  • 开发指引
    • 快速开始
    • 鉴权与限流
    • 如何使用 Lit Protocol 解密
  • API
    • Relation One 用户 Profile
    • 查询用户持有的NFT
    • 查询用户持有的SBT
    • 用户标签
    • 关系图谱
    • 多维推荐
    • 跨平台身份链接
    • 共同好友
    • 共同交互合约
    • 同一身份验证
Powered by GitBook
On this page
  • 接口地址
  • 演示的APIKey
  • 查询
  1. 开发指引

快速开始

Comprehensive reference for integrating with Relation Graph API endpoints

接口地址

  • https://api.relationlabs.ai

演示的APIKey

  • ApiKey: 581c6c4fa0b54912b00088aa563342a4

  • private key: 89a1a8c7d5f6ab952e02c5c6a71f48d60fbe06c21ec021374907d93d644b1236

查询

本服务采用 REST API 规范,可以使用你喜欢的 httpclient 方便的调用接口。

  • Example:

curl --location 'https://api.relationlabs.ai/api/v1/mutualFriend?address=0x0001%2C0x000002&limit=10' \
--header 'ApiKey: <ApiKey>' 
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://api.relationlabs.ai/api/v1/mutualFriend?address=0x0001%2C0x000002&limit=10',
  headers: {
      'ApiKey': '<ApiKey>'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
package main

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

func main() {

  url := "https://api.relationlabs.ai/api/v1/mutualFriend?address=0x0001%2C0x000002&limit=10"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
PreviousRelation GraphNext鉴权与限流

Last updated 1 year ago