跳转到主要内容
GET
https://api.aisa.one/apis/v1
/
agentmail
/
api-keys
列出 API 密钥
curl --request GET \
  --url https://api.aisa.one/apis/v1/agentmail/api-keys \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.aisa.one/apis/v1/agentmail/api-keys"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.aisa.one/apis/v1/agentmail/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/agentmail/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.aisa.one/apis/v1/agentmail/api-keys"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/agentmail/api-keys")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.aisa.one/apis/v1/agentmail/api-keys")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "count": 123,
  "api_keys": [
    {
      "api_key_id": "<string>",
      "prefix": "<string>",
      "name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "pod_id": "<string>",
      "inbox_id": "<string>",
      "used_at": "2023-11-07T05:31:56Z",
      "permissions": {
        "inbox_read": true,
        "inbox_create": true,
        "inbox_update": true,
        "inbox_delete": true,
        "thread_read": true,
        "thread_delete": true,
        "message_read": true,
        "message_send": true,
        "message_update": true,
        "label_spam_read": true,
        "label_blocked_read": true,
        "label_trash_read": true,
        "draft_read": true,
        "draft_create": true,
        "draft_update": true,
        "draft_delete": true,
        "draft_send": true,
        "webhook_read": true,
        "webhook_create": true,
        "webhook_update": true,
        "webhook_delete": true,
        "domain_read": true,
        "domain_create": true,
        "domain_update": true,
        "domain_delete": true,
        "list_entry_read": true,
        "list_entry_create": true,
        "list_entry_delete": true,
        "metrics_read": true,
        "api_key_read": true,
        "api_key_create": true,
        "api_key_delete": true,
        "pod_read": true,
        "pod_create": true,
        "pod_delete": true
      }
    }
  ],
  "next_page_token": "<string>"
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求头

Authorization
string
必填

Bearer 身份验证

查询参数

limit
integer

返回项目数量的上限。

page_token
string

用于分页的页面 token。

ascending
boolean

按时间升序排序。

响应

200 - application/json

状态码为 200 的响应

count
integer
必填

返回的项目数量。

api_keys
ApiKey · object[]
必填

created_at 降序排列。

next_page_token
string

用于分页的页面 token。