JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
clientID: process.env['FINCH_CLIENT_ID'], // This is the default and can be omitted
clientSecret: process.env['FINCH_CLIENT_SECRET'], // This is the default and can be omitted
});
const response = await client.connect.sessions.reauthenticate({ connection_id: 'connection_id' });
console.log(response.session_id);import os
from finch import Finch
client = Finch(
client_id=os.environ.get("FINCH_CLIENT_ID"), # This is the default and can be omitted
client_secret=os.environ.get("FINCH_CLIENT_SECRET"), # This is the default and can be omitted
)
response = client.connect.sessions.reauthenticate(
connection_id="connection_id",
)
print(response.session_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.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
response, err := client.Connect.Sessions.Reauthenticate(context.TODO(), finchgo.ConnectSessionReauthenticateParams{
ConnectionID: finchgo.F("connection_id"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.SessionID)
}
package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.ConnectSessionReauthenticateParams;
import com.tryfinch.api.models.SessionReauthenticateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.fromEnv();
ConnectSessionReauthenticateParams params = ConnectSessionReauthenticateParams.builder()
.connectionId("connection_id")
.build();
SessionReauthenticateResponse response = client.connect().sessions().reauthenticate(params);
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.ConnectSessionReauthenticateParams
import com.tryfinch.api.models.SessionReauthenticateResponse
fun main() {
val client: FinchClient = FinchOkHttpClient.fromEnv()
val params: ConnectSessionReauthenticateParams = ConnectSessionReauthenticateParams.builder()
.connectionId("connection_id")
.build()
val response: SessionReauthenticateResponse = client.connect().sessions().reauthenticate(params)
}require "finch_api"
finch = FinchAPI::Client.new(client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", client_secret: "My Client Secret")
response = finch.connect.sessions.reauthenticate(connection_id: "connection_id")
puts(response)curl --request POST \
--url https://api.tryfinch.com/connect/sessions/reauthenticate \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "<string>",
"redirect_uri": "<string>",
"minutes_to_expire": 123,
"products": []
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/connect/sessions/reauthenticate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'connection_id' => '<string>',
'redirect_uri' => '<string>',
'minutes_to_expire' => 123,
'products' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"connect_url": "https://connect.tryfinch.com/authorize?session=550e8400-e29b-41d4-a716-446655440000"
}{
"code": 400,
"finch_code": "invalid_request",
"message": "Connection not found",
"name": "bad_request"
}{
"code": 401,
"finch_code": "invalid_client",
"message": "Invalid client: Unable to validate credentials"
}Connect
Create a new Connect session for reauthentication
Create a new Connect session for reauthenticating an existing connection
POST
/
connect
/
sessions
/
reauthenticate
JavaScript
import Finch from '@tryfinch/finch-api';
const client = new Finch({
clientID: process.env['FINCH_CLIENT_ID'], // This is the default and can be omitted
clientSecret: process.env['FINCH_CLIENT_SECRET'], // This is the default and can be omitted
});
const response = await client.connect.sessions.reauthenticate({ connection_id: 'connection_id' });
console.log(response.session_id);import os
from finch import Finch
client = Finch(
client_id=os.environ.get("FINCH_CLIENT_ID"), # This is the default and can be omitted
client_secret=os.environ.get("FINCH_CLIENT_SECRET"), # This is the default and can be omitted
)
response = client.connect.sessions.reauthenticate(
connection_id="connection_id",
)
print(response.session_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.WithClientID("4ab15e51-11ad-49f4-acae-f343b7794375"),
option.WithClientSecret("My Client Secret"),
)
response, err := client.Connect.Sessions.Reauthenticate(context.TODO(), finchgo.ConnectSessionReauthenticateParams{
ConnectionID: finchgo.F("connection_id"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.SessionID)
}
package com.tryfinch.api.example;
import com.tryfinch.api.client.FinchClient;
import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
import com.tryfinch.api.models.ConnectSessionReauthenticateParams;
import com.tryfinch.api.models.SessionReauthenticateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
FinchClient client = FinchOkHttpClient.fromEnv();
ConnectSessionReauthenticateParams params = ConnectSessionReauthenticateParams.builder()
.connectionId("connection_id")
.build();
SessionReauthenticateResponse response = client.connect().sessions().reauthenticate(params);
}
}package com.tryfinch.api.example
import com.tryfinch.api.client.FinchClient
import com.tryfinch.api.client.okhttp.FinchOkHttpClient
import com.tryfinch.api.models.ConnectSessionReauthenticateParams
import com.tryfinch.api.models.SessionReauthenticateResponse
fun main() {
val client: FinchClient = FinchOkHttpClient.fromEnv()
val params: ConnectSessionReauthenticateParams = ConnectSessionReauthenticateParams.builder()
.connectionId("connection_id")
.build()
val response: SessionReauthenticateResponse = client.connect().sessions().reauthenticate(params)
}require "finch_api"
finch = FinchAPI::Client.new(client_id: "4ab15e51-11ad-49f4-acae-f343b7794375", client_secret: "My Client Secret")
response = finch.connect.sessions.reauthenticate(connection_id: "connection_id")
puts(response)curl --request POST \
--url https://api.tryfinch.com/connect/sessions/reauthenticate \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "<string>",
"redirect_uri": "<string>",
"minutes_to_expire": 123,
"products": []
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryfinch.com/connect/sessions/reauthenticate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'connection_id' => '<string>',
'redirect_uri' => '<string>',
'minutes_to_expire' => 123,
'products' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"connect_url": "https://connect.tryfinch.com/authorize?session=550e8400-e29b-41d4-a716-446655440000"
}{
"code": 400,
"finch_code": "invalid_request",
"message": "Connection not found",
"name": "bad_request"
}{
"code": 401,
"finch_code": "invalid_client",
"message": "Invalid client: Unable to validate credentials"
}NOTE: The connect session uses Basic Auth; in the sample request above use
client_id as the username and client_secret as a password.
For example: Authorization: Basic <base64 encoded client_id:client_secret>Body
application/json
The products to request access to (optional for reauthentication). Use benefits to access deductions endpoints — deduction is a deprecated alias that is still accepted but should not be combined with benefits.
Available options:
benefits, company, deduction, directory, documents, employment, individual, payment, pay_statement, plans, plans_dependents, plans_enrollments, recordkeeping, ssn Was this page helpful?