JavaScript
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"
}
]
}Management
Introspect
Read account information associated with an access_token
GET
/
introspect
JavaScript
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"
}
]
}Headers
Response
200 - application/json
OK
Was this page helpful?