> This page is for Developer.

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

# List Server to Server Tokens

GET https://api-b2b.bigcommerce.com/api/io/backend/tokens

> NOTE
> 
> This endpoint only retrieves `authToken` and not `X-Auth-Token` information.

Retrieves all B2B S2S API tokens associated with your store. You can use the token’s ID in the response to delete it via the Delete Backend API Tokens endpoint, or you can recover existing token values for further Server to Server requests.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/b2b/management/authentication/get-backend-tokens

## Authentication

- `authToken` header (required) — Required to authenticate requests. Include the token in a header parameter called `authToken`.

## Request

### Query parameters

- `limit` (integer, optional, default: 10) — The maximum number of results that can be in the response.
- `offset` (integer, optional, default: 0) — The number of results that should be skipped in the response.

## Response

### 200

OK

- `code` (integer, optional, default: 200) — The HTTP Status code of the response.
- `data` (list of BackendTokensGetResponsesContentApplicationJsonSchemaDataItems, optional)
- `meta` (BackendTokensGetResponsesContentApplicationJsonSchemaMeta, optional)

## Types

### BackendTokensGetResponsesContentApplicationJsonSchemaDataItems

- `id` (integer, optional) — The internal ID for the API token.
- `name` (string, optional) — The internal name assigned to the generated API token.
- `email` (string, optional) — The email address associated with the user's account.
- `storeHash` (string, optional) — The unique store hash for the BigCommerce store.
- `token` (string, optional)
- `eventChannel` (enum, optional) — This field indicates whether the token was created in the B2B Edition control panel (`app`), the admin (`admin`), or the API (`api`).
  - Allowed values: `app`, `admin`, `api`

### BackendTokensGetResponsesContentApplicationJsonSchemaMeta

- `message` (string, optional)
- `pagination` (responsePagination, optional)

### responsePagination

- `totalCount` (integer, optional) — The total number of items in the full response.
- `offset` (integer, optional, default: 0) — The number of results skipped before the first result.
- `limit` (integer, optional, default: 10) — The number of records returned per page.

## Examples

**Response**

```json
{
  "code": 200,
  "data": [
    {
      "id": 123,
      "name": "customer storefront token",
      "email": "user@example.com",
      "storeHash": "1234abcd",
      "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InRlc3RfYjJjX29yZGVyX2ltcG9ydEBxcS5jb21tIiwic3RvcmVfaGFzaCI6ImYyb3N4ampueGoiLCJkYiI6ImRlZmF1bHQifQ.L_u_enljWoYBbPPskmYEQVHldHIaTcWMIB-SdFah850",
      "eventChannel": "app"
    }
  ],
  "meta": {
    "message": "SUCCESS",
    "pagination": {
      "totalCount": 25,
      "offset": 0,
      "limit": 10
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api-b2b.bigcommerce.com/api/io/backend/tokens"

querystring = {"limit":"10","offset":"10"}

headers = {"authToken": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://api-b2b.bigcommerce.com/api/io/backend/tokens?limit=10&offset=10';
const options = {method: 'GET', headers: {authToken: '<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-b2b.bigcommerce.com/api/io/backend/tokens?limit=10&offset=10"

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

	req.Header.Add("authToken", "<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-b2b.bigcommerce.com/api/io/backend/tokens?limit=10&offset=10")

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

request = Net::HTTP::Get.new(url)
request["authToken"] = '<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-b2b.bigcommerce.com/api/io/backend/tokens?limit=10&offset=10")
  .header("authToken", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-b2b.bigcommerce.com/api/io/backend/tokens?limit=10&offset=10', [
  'headers' => [
    'authToken' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/io/backend/tokens?limit=10&offset=10");
var request = new RestRequest(Method.GET);
request.AddHeader("authToken", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["authToken": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/io/backend/tokens?limit=10&offset=10")! 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()
```