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

# List your API tokens

GET https://api.finput.com.au/api/v1/api-tokens

Token metadata only. The secret is returned exactly once, when the token is minted, and is never retrievable afterwards.

Reference: https://docs.finput.com.au/api/endpoints/api-tokens/list-api-tokens

## Authentication

- `Authorization` header (bearer token, required) — JWT access token obtained from `POST /api/v1/auth/login`, or a `finput_sk_...` API token

## Response

### 200

Tokens

- `list of ApiToken`

## Types

### ApiToken

Token metadata. Never carries the secret.

- `id` (integer, optional)
- `name` (string, optional)
- `token_id` (string, optional) — Public identifier, safe to log.
- `last_four` (string, optional) — Last four characters, for recognising a token in a list.
- `scope` (enum, optional) — `read` allows every `GET`, plus the five computation endpoints: `POST /calculator`, `/calculator/recalculate`, `/calculator/abn-lookup`, `/matrix/` and `/matrix-calculator/`. Running those still consumes daily calculator/Matrix allowance and adds to the caller's own recents; what `read` prevents is changing data another request reads back, saved scenarios included. `read_write` additionally allows mutations. Both are bounded by the owner's own permissions — a token can never exceed what its owner could do in the UI.
  - Allowed values: `read`, `read_write`
- `environment` (enum, optional) — The environment this token was minted in. A token is only accepted by the environment that issued it.
  - Allowed values: `local`, `qa`, `stage`, `prod`
- `origin` (enum, optional) — How the token was created: `ui` from Settings, `mcp` by approving an AI assistant's connection request. Read-only — it cannot be set at mint time, and only `mcp` tokens are accepted at `POST /mcp`.
  - Allowed values: `ui`, `mcp`
- `created_at` (datetime, optional)
- `expires_at` (datetime, optional)
- `last_used_at` (datetime, optional, nullable)
- `revoked_at` (datetime, optional, nullable)

## Examples

**Response**

```json
[
  {
    "id": 1,
    "name": "string",
    "token_id": "string",
    "last_four": "string",
    "scope": "read",
    "environment": "local",
    "origin": "ui",
    "created_at": "2024-01-15T09:30:00Z",
    "expires_at": "2024-01-15T09:30:00Z",
    "last_used_at": "2024-01-15T09:30:00Z",
    "revoked_at": "2024-01-15T09:30:00Z"
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.finput.com.au/api/v1/api-tokens"

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

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

print(response.json())
```

```javascript
const url = 'https://api.finput.com.au/api/v1/api-tokens';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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.finput.com.au/api/v1/api-tokens"

	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(res)
	fmt.Println(string(body))

}
```

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

url = URI("https://api.finput.com.au/api/v1/api-tokens")

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
```

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

HttpResponse<String> response = Unirest.get("https://api.finput.com.au/api/v1/api-tokens")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.finput.com.au/api/v1/api-tokens', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.finput.com.au/api/v1/api-tokens");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.finput.com.au/api/v1/api-tokens")! 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()
```