import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
const introspection = await client.account.introspect();
console.log(introspection.id);from finch import Finch
client = Finch(
access_token="My Access Token",
)
introspection = client.account.introspect()
print(introspection.id)package main
import (
"context"
"fmt"
"github.com/Finch-API/finch-api-go/v2"
"github.com/Finch-API/finch-api-go/v2/option"
)
func main() {
client := finchgo.NewClient(
option.WithAccessToken("My Access Token"),
)
introspection, err := client.Account.Introspect(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", introspection.ID)
}
package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.AccountIntrospectParams;
import com.tryfinch.api.models.Introspection;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
Introspection introspection = client.account().introspect();
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.AccountIntrospectParams
import com.tryfinch.api.models.Introspection
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val introspection: Introspection = client.account().introspect()
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
introspection = finch.account.introspect
puts(introspection)curl --request GET \
--url https://api.tryfinch.com/introspect \
--header 'Authorization: Bearer <token>' \
--header 'Finch-API-Version: <finch-api-version>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/introspect",
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>",
"Finch-API-Version: <finch-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"connection_id": "<string>",
"connection_status": {
"status": "pending",
"message": "<string>",
"last_successful_sync": "2023-11-07T05:31:56Z"
},
"client_id": "<string>",
"client_type": "development",
"connection_type": "finch",
"products": [
"<string>"
],
"provider_id": "<string>",
"company_id": "<string>",
"account_id": "<string>",
"customer_id": "<string>",
"customer_name": "<string>",
"customer_email": "<string>",
"authentication_methods": [
{
"type": "assisted",
"connection_status": {
"status": "pending",
"message": "<string>",
"last_successful_sync": "2023-11-07T05:31:56Z"
},
"products": [
"<string>"
]
}
],
"username": "<string>",
"payroll_provider_id": "<string>",
"manual": true,
"entities": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"source_id": "<string>",
"status": "pending"
}
]
}Introspect
Read account information associated with an access_token
import Finch from '@tryfinch/finch-api';
const client = new Finch({
accessToken: 'My Access Token',
});
const introspection = await client.account.introspect();
console.log(introspection.id);from finch import Finch
client = Finch(
access_token="My Access Token",
)
introspection = client.account.introspect()
print(introspection.id)package main
import (
"context"
"fmt"
"github.com/Finch-API/finch-api-go/v2"
"github.com/Finch-API/finch-api-go/v2/option"
)
func main() {
client := finchgo.NewClient(
option.WithAccessToken("My Access Token"),
)
introspection, err := client.Account.Introspect(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", introspection.ID)
}
package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.AccountIntrospectParams;
import com.tryfinch.api.models.Introspection;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();
Introspection introspection = client.account().introspect();
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.AccountIntrospectParams
import com.tryfinch.api.models.Introspection
fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()
val introspection: Introspection = client.account().introspect()
}require "finch_api"
finch = FinchAPI::Client.new(access_token: "My Access Token")
introspection = finch.account.introspect
puts(introspection)curl --request GET \
--url https://api.tryfinch.com/introspect \
--header 'Authorization: Bearer <token>' \
--header 'Finch-API-Version: <finch-api-version>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/introspect",
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>",
"Finch-API-Version: <finch-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"connection_id": "<string>",
"connection_status": {
"status": "pending",
"message": "<string>",
"last_successful_sync": "2023-11-07T05:31:56Z"
},
"client_id": "<string>",
"client_type": "development",
"connection_type": "finch",
"products": [
"<string>"
],
"provider_id": "<string>",
"company_id": "<string>",
"account_id": "<string>",
"customer_id": "<string>",
"customer_name": "<string>",
"customer_email": "<string>",
"authentication_methods": [
{
"type": "assisted",
"connection_status": {
"status": "pending",
"message": "<string>",
"last_successful_sync": "2023-11-07T05:31:56Z"
},
"products": [
"<string>"
]
}
],
"username": "<string>",
"payroll_provider_id": "<string>",
"manual": true,
"entities": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"source_id": "<string>",
"status": "pending"
}
]
}Authorizations
Please use your Access Token
Headers
Header used to specify the version for a given API request. Current version is 2020-09-17.
Response
OK
The Finch UUID of the token being introspected
The Finch UUID of the connection associated with the access_token
Show child attributes
Show child attributes
The client ID of the application associated with the access_token
The type of application associated with a token.
development, production, sandbox The type of the connection associated with the token.
provider- connection to an external providerfinch- finch-generated data.
finch, provider An array of the authorized products associated with the access_token.
The ID of the provider associated with the access_token.
The Finch UUID of the company associated with the access_token.
[DEPRECATED] Use connection_id to associate tokens with a Finch connection instead of this account ID
The ID of your customer you provided to Finch when a connect session was created for this connection
The name of your customer you provided to Finch when a connect session was created for this connection
The email of your customer you provided to Finch when a connect session was created for this connection
Show child attributes
Show child attributes
The account username used for login associated with the access_token.
[DEPRECATED] Use provider_id to identify the provider instead of this payroll provider ID.
Whether the connection associated with the access_token uses the Assisted Connect Flow. (true if using Assisted Connect, false if connection is automated)
Array of detailed entity information for each connected account in multi-account mode
Show child attributes
Show child attributes
Was this page helpful?