> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getedulead.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getedulead.com/_mcp/server.

# ListApiKeys

GET https://api.getedulead.com/v4/api_keys

ListApiKeys pages through the team's API keys, newest first unless order_by says otherwise.
 A key's secret is never listed.

Reference: https://docs.getedulead.com/api-reference/api-keys/list

## Authentication

- `Authorization` header (bearer token, required) — A team API key, sent as `Authorization: Bearer <key>`.
- `Authorization` header (bearer token, required) — The Cognito access token of a signed-in Edulead user (`edulead auth login`), sent as `Authorization: Bearer <token>`.

## Request

### Query parameters

- `page_size` (integer, optional) — Number of items per page, at most the maximum shown. Omitted or 0 means the RPC's default page size.
- `page_token` (string, optional) — Opaque token from a previous response; empty for the first page.
- `order_by` (enum, optional) — Sort order: a sortable field name, optionally followed by " desc". The allowed values are listed.
  - Allowed values: ``, `create_time desc`, `create_time`

## Response

### 200

Success

- `items` (list of edulead.v4.ApiKey, optional) — The page of results, in the requested order.
- `next_page_token` (string, optional) — Token for the next page; empty when this is the last page.

## Types

### edulead.v4.ApiKey

ApiKey is one of the team's API keys. Keys Edulead issued before keys could be created through the API have no create_time; they list as the oldest.

- `id` (string, optional) — Identifier of the resource, assigned by Edulead and opaque to callers.
- `name` (string, optional) — A label for the key, trimmed; may be empty. Names need not be unique.
- `prefix` (string, optional) — The secret's first 8 characters, to tell keys apart.
- `creator_id` (string, optional) — The user who created the key; empty for keys Edulead issued.
- `create_time` (datetime, optional) — When Edulead created the resource.
- `secret` (string, optional) — The full key, to send as `Authorization: Bearer <secret>`. Set only in CreateApiKey's response, the one time it is shown: store it. Empty everywhere else.

## Examples

**Response**

```json
{
  "items": [
    {
      "id": "string",
      "name": "string",
      "prefix": "string",
      "creator_id": "string",
      "create_time": "2023-01-15T01:30:15.01Z",
      "secret": "string"
    }
  ],
  "next_page_token": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.getedulead.com/v4/api_keys"

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

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

print(response.json())
```

```javascript
const url = 'https://api.getedulead.com/v4/api_keys';
const options = {method: 'GET', headers: {Authorization: 'Bearer <apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://api.getedulead.com/v4/api_keys"

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

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

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.getedulead.com/v4/api_keys")

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

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

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.getedulead.com/v4/api_keys")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getedulead.com/v4/api_keys', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.getedulead.com/v4/api_keys");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getedulead.com/v4/api_keys")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```