> This page is for Unified.

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

# /account-token/{public_token}

GET https://api.merge.dev/api/knowledgebase/v1/account-token/{public_token}

Returns the account token for the end user with the provided public token.

Reference: https://docs.merge.dev/merge-unified/knowledge-base/linked-account/account-token/retrieve

## Authentication

- `Authorization` header (bearer token, required) — Token-based authentication with required prefix "Bearer"

## Servers

- `https://api.merge.dev/api` (Production, default)
- `https://api-eu.merge.dev/api` (ProductionEU)
- `https://api-ap.merge.dev/api` (ProductionAPSE1)
- `https://api-ap.merge.dev/api/knowledgebase/v1` (ProductionAPSE1)

## Request

### Path parameters

- `public_token` (string, required)

## Response

### 200

- `account_token` (string, required)
- `integration` (AccountIntegration, required)
- `id` (string, required)

## Types

### AccountIntegration

- `name` (string, required) — Company name.
- `abbreviated_name` (string, optional, nullable) — Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)
- `categories` (list of enum, optional) — Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].
  - Allowed values: `hris`, `ats`, `accounting`, `ticketing`, `crm`, `mktg`, `filestorage`, `knowledgebase`
- `image` (string, optional, nullable) — Company logo in rectangular shape.
- `square_image` (string, optional, nullable) — Company logo in square shape.
- `color` (string, optional) — The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color.
- `slug` (string, optional)
- `api_endpoints_to_documentation_urls` (map from string to any, optional) — Mapping of API endpoints to documentation urls for support. Example: \{'GET': \[\['/common-model-scopes', '[https://docs.merge.dev/accounting/common-model-scopes/#common\_model\_scopes\_retrieve'\],\['/common-model-actions](https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],\['/common-model-actions)', '[https://docs.merge.dev/accounting/common-model-actions/#common\_model\_actions\_retrieve](https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve)']], 'POST': \[]}
- `webhook_setup_guide_url` (string, optional, nullable) — Setup guide URL for third party webhook creation. Exposed in Merge Docs.
- `category_beta_status` (AccountIntegrationCategoryBetaStatus, optional) — Category or categories this integration is in beta status for.

### AccountIntegrationCategoryBetaStatus

Category or categories this integration is in beta status for.

## Examples

**Response**

```json
{
  "account_token": "T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB",
  "integration": {
    "name": "SAP SuccessFactors",
    "categories": [
      "hris",
      "ats"
    ],
    "image": "https://cdn.merge.dev/SuccessFactors_Logo.png",
    "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg",
    "color": "#F6A704",
    "slug": "sap-successfactors"
  },
  "id": "0496d4c2-42e6-4072-80b3-7b69bfdc76fd"
}
```

**SDK Code**

```python
import requests

url = "https://api.merge.dev/api/knowledgebase/v1/account-token/public_token"

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

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

print(response.json())
```

```javascript
const url = 'https://api.merge.dev/api/knowledgebase/v1/account-token/public_token';
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.merge.dev/api/knowledgebase/v1/account-token/public_token"

	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.merge.dev/api/knowledgebase/v1/account-token/public_token")

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.merge.dev/api/knowledgebase/v1/account-token/public_token")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.merge.dev/api/knowledgebase/v1/account-token/public_token', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.merge.dev/api/knowledgebase/v1/account-token/public_token");
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.merge.dev/api/knowledgebase/v1/account-token/public_token")! 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()
```