Skip to main content
POST
/
disconnect
JavaScript
import Finch from '@tryfinch/finch-api';

const client = new Finch({
  accessToken: 'My Access Token',
});

const disconnectResponse = await client.account.disconnect();

console.log(disconnectResponse.status);
from finch import Finch

client = Finch(
access_token="My Access Token",
)
disconnect_response = client.account.disconnect()
print(disconnect_response.status)
package main

import (
"context"
"fmt"

"github.com/Finch-API/finch-api-go"
"github.com/Finch-API/finch-api-go/option"
)

func main() {
client := finchgo.NewClient(
option.WithAccessToken("My Access Token"),
)
disconnectResponse, err := client.Account.Disconnect(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", disconnectResponse.Status)
}
package com.tryfinch.api.example;

import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.AccountDisconnectParams;
import com.tryfinch.api.models.DisconnectResponse;

public final class Main {
private Main() {}

public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build();

DisconnectResponse disconnectResponse = client.account().disconnect();
}
}
package com.tryfinch.api.example

import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.AccountDisconnectParams
import com.tryfinch.api.models.DisconnectResponse

fun main() {
val client: FinchClient = FinchOkHttpClient.builder()
.fromEnv()
.accessToken("My Access Token")
.build()

val disconnectResponse: DisconnectResponse = client.account().disconnect()
}
require "finch_api"

finch = FinchAPI::Client.new(access_token: "My Access Token")

disconnect_response = finch.account.disconnect

puts(disconnect_response)
curl --request POST \
--url https://api.tryfinch.com/disconnect \
--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/disconnect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}
{
  "status": "success"
}
Deletion is based on both the employer and provider of the access_token used to call this endpoint, and will also delete all tokens with the same employer/provider pair. Other tokens for the same employer, but connected to a different provider, require a separate call. We require applications to implement the Disconnect endpoint for billing and security purposes.

Authorizations

Authorization
string
header
required

Please use your Access Token

Headers

Finch-API-Version
string<date>
default:2020-09-17
required

Header used to specify the version for a given API request. Current version is 2020-09-17.

Pattern: ([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))

Response

200 - application/json

OK

status
string
required

If the request is successful, Finch will return "success" (HTTP 200 status).